I did little bit more experiments and I realized this problem happens
when I compile FOX with Japanese version of Visual Studio 2005 on
Japanese version of Windows XP. When I built FOX with English version
of Visual Studio 2005 on Windows Vista and tested adie, the file name
appeared fine. Therefore, it's probably not a bug in FOX but somewhere
in the system or system libraries.
On Sat, May 17, 2008 at 11:46 PM, Shikata Hidenori
> Hi. I found a problem when I typed in Japanese filename with
> FXFileDialog. Please let me just report it without knowing how to fix
> What happened was I typed in three Japanese Kanji characters +
> extension ".txt" in FXFileDialog to save the content in adie. After I
> save it to the file, the file name was partially messed up. What I
> used was adie compiled as x64 binary. When I did exactly the same
> thing using adie build as win32 binary (and on 32bit windows), the
> filename appeared just fine.
> The byte string of the filename was (in the form of utf-8)
> 0xe6, 0x97, 0xa5, 0xe6, 0x9c, 0xac, 0xe8, 0xaa, 0x9e, 0x2e, 0x74,
> 0x78, 0x74, 0x00
> and the string was correctly stored in FXTextField. In
> FXFileSelector::getFilename, it calls FXPath::expand and subsequently
> ExpandEnvironmentStringA gets called. After this call, 9th and 10th
> byte in the string were altered to 0x86 and 0x45, respectively,
> resulting in partially messed up string.
> Again, this doesn't seem to happen on win32. Does anyone have an idea
> how to fix this?