lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



16 August 2012 16:45
However, I filed a Win 7 bug report with Microsoft yesterday on a
desktop theme-dependent rendering of path separators displayed in the
app's status bar, where the backslash renders as the Yen symbol. Most
problematic themes are Aero Desktop themes.

While tracking down the problem, I ran across some information that
might be relevant to your issue (but I haven't thought this through):

"In the Japanese editions of Microsoft operating systems, the yen sign
in code page 932 character encoding has the same byte value as the
backslash in ASCII. It is also used wherever a backslash is used, such
as the directory separator character and the general escape
character,[2] essentially making it a backslash with a yen sign look,
a peculiarity that stems from JIS X 0201."

<http://en.wikipedia.org/wiki/%C2%A5#Code_page_932>

Given the strong suspicion that code page 932 is leaking into the US
locale, it's conceivable that it's also leaking into other parts of
the Windows code base where it shouldn't.

In other words, I raise the notion that you might be facing a Windows
code page bug rather than being a Unicode issue.

Best regards,

Paul
Windows 7 will translate Yen -> Backslash when going from Unicode to JIS, but keep backslashes as backslashes when translating from JIS to Unicode.

My suspicion here is that in fact you have a Japanese font being used in your app's status bar. For said fonts, the backslash character is associated with the Yen glyph, and so will display as a Yen sign.

Michael Kaplan has a great explanation of this on his blog: http://blogs.msdn.com/b/michkap/archive/2005/11/01/487665.aspx

It should also be noted that the Windows file I/O routines never accept UTF-8 paths and that the only way to use Unicode file names in Win32 is to go through the W functions which take UTF-16 strings. The A variation of the functions only support the system selected multibyte character set.