Hacker News new | ask | show | jobs
by red_hare 750 days ago
> ALT-yen-mark to get a proper backslash

I believe this is an artifact of JIS_X0201, which is, to my knowledge, the first major Japanese 8-bit encoding and mostly 7-bit ASCII + Katakana (that character set you see in old Japanese video games) and some Japan-specific symbols filling the other half of the 8-bit space.

In it, byte 0x23 was changed from "\" to "¥".

The history is fascinating:

> The 1964 ISO draft reserved the positions 0x24 and 0x5c for first and second currency symbols to be assigned by each country, but it was considered too dangerous in international communications to use currency symbols that could be localized. The ISO committee had two options that to use a generic currency symbol (¤) or to give the dollar ($) and pound (£) signs permanent assignments. It was agreed that the dollar sign was assigned to position 0x24 and the pound sign was to position 0x23. The latter was not required in countries that did not need the pound sign. The JIS committee decided to put the yen sign (¥) in 0x5c (one of the national use positions).

https://en.wikipedia.org/wiki/JIS_X_0201

It's legacy lived on in Shift JIS which Window's extended and resulted in Japanese Windows computers having file paths like "C:¥Users¥MyName" and escape sequences like "¥n"

All this to say, my respect for Japanese devs who work with encoding is top-tier.

2 comments

Related to this, when I was in Japan in the '90s I had to get used to "¥" being the directory separator, so a path might be:

C:¥Program Files¥Microsoft¥Office¥word.exe

It is still true nowadays. For Japanese version of Windows, you will see a lot of ¥ in all kinds of pathes.