The International Simutrans Forum

 

Author Topic: UTF-8 character input (redraft)  (Read 921 times)

0 Members and 1 Guest are viewing this topic.

Offline Phystam

  • Devotee
  • *
  • Posts: 496
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
UTF-8 character input (redraft)
« on: July 04, 2017, 10:26:27 PM »
//I do not know how to move a thread, so I redrafted this.
I could not input UTF-8 characters sequence such as Japanese.
When I added a code in "static void fill_event(event_t* const ev)" function of simevent.cc as follows:
Code: [Select]
switch (sys_event.type) {
    case SIM_KEYBOARD:
        ev->ev_class = EVENT_KEYBOARD;
        ev->ev_class = sys_event.code;
        break;
    case SIM_STRING: //added
        ev->ev_class = EVENT_STRING; //added
        ev->ev_ptr = sys_event.ptr; //added
        break; //added
    ...
}
then the issue was fixed. This code is included in standard version but not included in extended version.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20341
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: UTF-8 character input (redraft)
« Reply #1 on: July 05, 2017, 12:06:13 AM »
Excellent, thank you very much for that - now incorporated.

Offline Phystam

  • Devotee
  • *
  • Posts: 496
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: UTF-8 character input (redraft)
« Reply #2 on: July 06, 2017, 05:25:41 AM »
Thanks a lot for your early response and updating!