On 15.04.2011 03:54, William A. Rowe Jr. wrote: > On 4/14/2011 8:47 PM, Jonathan Leffler wrote: >> The Wikipedia page for Shift-JIS (http://en.wikipedia.org/wiki/Shift_JIS) >> shows the Yen >> symbol ¥ as appearing at 0x5C, which is where the backslash appears in >> Unicode and ISO >> 8859-x codesets. >> >> It (backslash) also falls into the danger zone identified earlier >> (0x40..0x7E). Sorry - I >> didn't check backslash earlier. > Right... even if 0x5C is a pathname separator on win32 using Shift-JIS, we > still would > never be able to trust an arbitrary strchr() search. But I am still very > curious what > the Shift-JIS separators are (Win32 should always accept '/', is '¥' also a > separator?)
It is, and it's interpreted exactly as \, because it's the same code point. It just happens that the glyph in Japanese console fonts looks like ¥ not \. I don't remember what happens if you use the proper Unicode-aware output functions. Woe to poor programmers who don't realize it can /also/ be the second byte of a multibyte Shift-JIS-encoded character. -- Brane
