The International Simutrans Forum

 

Author Topic: [GDI nightly] Cannot input Japanese using IME  (Read 2507 times)

0 Members and 1 Guest are viewing this topic.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
[GDI nightly] Cannot input Japanese using IME
« on: July 06, 2014, 11:36:45 AM »
r7264 GDI, Windows 8.1 Update, Microsoft Japanese IME

I cannot input Japanese text with IME.

An another strange thing is that text on simutrans window's title bar shows only 'S'. This problem doesn't happen in SDL version. SDL version shows 'Simutrans 120.0.1 Nightly -r7264' on its title bar.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5454
  • Languages: EN, NO
Re: [GDI nightly] Cannot input Japanese using IME
« Reply #1 on: July 06, 2014, 11:45:39 AM »
I have no experience with asian codepages, but I suspect feeding a hardcoded ASCII string to CreateWindowEx can fail in such a way on a system that doesn't have an ASCII compatible "ANSI" codepage, and that such "strange" "ANSI" codepages are normal on oriental Windows systems.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9433
  • Languages: De,EN,JP
Re: [GDI nightly] Cannot input Japanese using IME
« Reply #2 on: July 06, 2014, 10:56:05 PM »
No if you send a ANSI string ti a UTF16 (like windows) you should not get an "S". Even more if you use explicitely CreateWindowExA.

I would like to get more informations, if this is a self-compiled build and if it was done in MSVC (which worked with IME on windows8.1 for me some revisions back).

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5454
  • Languages: EN, NO
Re: [GDI nightly] Cannot input Japanese using IME
« Reply #3 on: July 07, 2014, 07:02:51 AM »
Even more if you use explicitely CreateWindowExA.

Only as long as all Windows code pages are identical (with som leniency) in the range [0, 127]. They might be, I only know the Windows 1252 code page.

No if you send a ANSI string ti a UTF16 (like windows) you should not get an "S".

If one does the other way around, one will however get just an "S" (assuming UTF16LE). This will only happen if someone made a buggy build, most likely after tampering with the source code. It will then also have nothing to do with Windows 8.1 or Japanese.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9433
  • Languages: De,EN,JP
Re: [GDI nightly] Cannot input Japanese using IME
« Reply #4 on: July 07, 2014, 09:06:19 PM »
UTF16 as done with windows would result in the character 0x6953 楓 ... (the small endian iS in hex).

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5454
  • Languages: EN, NO
Re: [GDI nightly] Cannot input Japanese using IME
« Reply #5 on: July 08, 2014, 04:32:30 AM »
UTF16 as done with windows would result in the character 0x6953 楓 ... (the small endian iS in hex).

That would be ANSI as UTF16LE again, "Simutrans" in UTF16LE (0x0053, 0x0069, ...) interpreted as ANSI would be 0x53, 0x00, 0x69, 0x00, ... which would be considered terminated at the second byte since it is 0, hence just "S".

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9433
  • Languages: De,EN,JP
Re: [GDI nightly] Cannot input Japanese using IME
« Reply #6 on: July 17, 2014, 10:53:35 PM »
Anyway can anyone reproduce this?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5454
  • Languages: EN, NO
Re: [GDI nightly] Cannot input Japanese using IME
« Reply #7 on: July 18, 2014, 05:17:06 AM »
Anyway can anyone reproduce this?

I'm waiting for z9999+ to answer your question before spending more time on it.

I would like to get more informations, if this is a self-compiled build and if it was done in MSVC (which worked with IME on windows8.1 for me some revisions back).