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

0 Members and 1 Guest are viewing this topic.

Offline Phystam

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

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15553
  • Total likes: 382
  • Helpful: 172
  • 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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Phystam

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!