1

Recently, I've found that the Japanese use JIS X 0201 encoding as an alternative to ASCII. One of the biggest difference between them is the JIS X 0201 replace the backslash(\) with Japanese yen symbol().

This adaption of backslash leads to Microsoft Windows in Japanese locale uses in its directory path, e.g., C:¥user¥Alice¥document

Again, when using TeX, I guess, the Japanese should use as the command escape character to replace the missing \ in Japanese locale. Is this true?

I think Japanese (La)TeX users may be helpful for this question. :-)

Thanks at first!

2
  • 1
    It's news to me that one can't use the backslash character for its usual purpose in a Japanese TeX or LaTeX document. Note that input encodings and TeX category codes are (more or less) independent concepts.
    – Mico
    Commented Aug 4, 2013 at 10:57
  • @Mico is right—apart from a few weird things like glyph casing, TeX doesn't particularly care what encoding you're using. It's looking at the binary data anyways, so as long the binary data matches what TeX expects to be a ( \ ), you're golden. So, press whichever key puts a 0b01011100 into the buffer ;-) (Ok, so I'm disregarding higher-level encoding schemes such as little/big endian, but still.) Commented Aug 4, 2013 at 23:10

1 Answer 1

5

Yes, this is true. Well, sort of.

Back in the days when computers were still fairly new, both Japanese and Korean encodings replaced the backslash with their currency symbol; that is, the character with the value 0x5c looks like ¥ on a Japanese machine, ₩ on a Korean machine, and \ everywhere else.

As operating systems moved to Unicode, you would think it would be possible for them to start using the proper symbol - but it isn't, because their keyboards don't actually produce that symbol. So, from a technical standpoint, it's a backslash, but the visuals are those of a yen/won sign. This is possible in the same way that this G looks different from this G; it's just a more extreme version of it.

To avoid having a text like ¥100 from suddenly reading \100, Japanese and Korean fonts essentially have to perpetuate this "mistake" - there is no simple migration path, because you can't know if they meant the backslash (e.g. as a path separator on Windows), or if they actually meant the currency symbol.

I happen to use a Japanese font (MS Gothic) in my editor, for the simple reason that I prefer it to other monospaced fonts - not because I actually do any Japanese writing or anything. That means that this small snippet from my preamble:

\usepackage{lmodern}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

actually looks like this:

MS Gothic rendition of above code snippet at 10pt

It takes a little getting used to, but as long as you don't need the actual ¥ sign (or ₩ for Korean fonts), it's not really a problem - you're not going to confuse one for the other, and the characters beneath the glyph still represent backslashes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .