Now that I live in Japan, I've come to learn that for Japanese Windows users, seeing the ¥ symbol as a path separator is normal, it isn't a quirk or a bug. In fact, IIRC the copy machine in the closest convenience store shows a ¥ as the path separator when browsing a USB drive, even though I'm almost certain it's not running Windows.
A few years back, I wrote a CTF challenge around this quirk of SHIFT_JIS. It used a python MySQLdb connection set to SHIFT_JIS mode and a custom naïve mysql escape function. The trick was to use a yen symbol and have it get interpreted as an unescaped backslash, leading to a SQL injection. Also it was all over websockets just to be annoying.
But you can always just use a different layout for your keyboard. So eve with a keyboard with physical key engravings in Japanese you could just use a US layout.
I remember seeing this when I was a CS research intern working at a major Japanese company in Kawasaki back in 2010. I'm from America, and this was my first time in Japan. At the company, our workstations ran Windows XP; I guess the company refused upgrading to Vista, and Windows 7 was not yet approved.
This article brought back two memories:
1. Learning how to code on a Japanese keyboard, where some of the symbols were in different locations, and where I needed to get used to having two small space bars instead of one single, long space bar. Eventually one of my coworkers introduced me to the Happy Hacking Keyboard (https://happyhackingkb.com), which is popular among programmers in Japan due to its typing feel and the fact it has a version with a US-style keyboard layout. I stuck with that keyboard for the rest of my internship.
2. Seeing ¥n in my code instead of \n.
Eventually I ended up installing a Linux virtual machine on my workstation that was localized to American English, though a big reason for this was because my internship project was writing a Linux kernel module. But I still needed to use my Japanese knowledge to use Microsoft Office and other programs on Windows.
My eight months in Kawasaki were among the best in my life. Since then I've been to Japan six more times, and I'm looking forward to visiting Japan again once it's reopen to tourism.
I remember wanting to buy the Happy Hacker keyboard around 15 years ago or so, although I never did. I love this quote from their website:
“Cowboys in the western United States leave their horses when they die. But never leave their saddles, regardless of how long they need to walk in the desert. Saddles are interfaces that are deeply adapted to our bodies whereas horses are consumable items. It should not be forgotten that computers are consumables nowadays, but keyboards are interfaces that we can use through our lives.”
This resonates with me because I decided that I’d use a laptop-sized keyboard and trackpad for all my computing, even at my desk (which is 95% of the time nowadays.)
The apple magic keyboard 2 (I think?) is nearly exactly the same size, layout, and key throw as the pre-2016 MacBook Pro scissor keyboards… and the Magic Trackpad does all the same gestures, etc.
Which means I can switch to my laptop at any time and not have to re-adjust to different ergonomics, everything’s more or less the same. I just can’t wait for my M1 pro max to ship, because I can’t stand the butterfly keyboard having such a different key throw and I’ll be back to more or less parity again.
Interesting - I actually switched to a small keyboard about a year ago because I was getting shoulder pain from my right arm hanging so far to the side so I could work the mouse. The smaller keyboard forces both of my arms closer to my body, and the chronic pain I had in my shoulder for a year or two has disappeared.
I also use a small keyboard (Keychron K3) even on my desktop, but once in the past when I switched to a full-sized keyboard, I intentionally switched to left-hand mousing since the extra distance is only on the right side (with the numpad).
I was also hoping the switch would help balance out my shoulders after years of right-hand mousing. It took a few days to get used to, but now I'm basically mouse/trackpad ambidextrous. I'm not sure if it helped my shoulder; I think maybe it did, but too many confounding factors.
My ideal keyboard would have buckling spring switches in the body of a Poker 2 for this exact reason. I can use a separate numpad on the far side of my mouse for extended numeric entry, but the far more frequent use of keeping my left over the keys while my right uses the rodent is made much less RSI-prone.
When you had your shoulder pain, was it primarily at the very base of the shoulder blade? That's where it was for me before I moved to a vertical mouse.
Now that a significant number of programmers use Mac keyboard, I frequently see people go for the "International" layout that is available from every Apple stores() for all keyboard including laptops. It's pretty close to the US layout, with a bigger entry key and two more keys as a bonus.
() in some store I think it's the "GB international". Also, it's such as shame all layouts aren't available from all countries, when in practice ordering a laptop means having it shipped from China anyway.
I think it’s partially a local inventory issue but more importantly reduces the chance the customer will accidentally order the wrong thing, at the cost of making an unusual case more complicated.
I wonder if beyond local inventory, there is a repair/support aspect to it.
On the confusion part, I once went through phone support back and forth to get a BTO with a different keyboard. It didn't work, and I didn't get much info beyond shrugs. They basically tried to pass the order to the JP branch and it didn't pan out.
There are significant differences in what's on shift+numbers. Like ( is on 8 and ) on 9. (IIRC they are on 9 and 0 on US keyboards) Other non alphabetical keys have different location too.
I use the normal Portuguese keyboards but with the US intl layout.
Remnants from a time where my iBook g3 keyboard was US, and the Portuguese layout cost extra. I never got used to the Mac Portuguese layout either. Shortcut issues and some symbols in wrong places.
Makes computers easier to resell locally when I upgrade.
I just ordered the new MBP with US Keyboard from Apple Store in Japan. Default is Japanese JIS keyboard. Drop down selection for keyboard also had other localities and language options.
Oh man, I had a similar experience with the keyboard and a large Japanese company, but I just got used to it. Going back and forth between my laptop at the company dorm(!) and work was disorienting. Really liked being able to hit " without holding shift though. And I think @ was somewhere more reasonable? Too lazy to look it up right now but boy was that "fun". My memory's hazy, but I think my machine's language was set to en so at least I had normal backslashes.
In ex Yugoslavian keyboards, back in the days of DOS 3.x, the backslash was frequently usurped by the letter Đ.
It's 30 years later, I've been speaking and dreaming and internal monologuing in English longer than in my native language (whatever it might be:) - but I still mentally read c:\Program Files\my folder\my file.txt
As
See colon DJ program files DJ my folder DJ my file dot tee ex tee
(where DJ or Đ is closest pronounced as G in angel or Angelica though not quite)
You think an English word might use either sound based on the sounds that surround it? (Not out of the question by any means, but not what I expected.)
In your language, does a minimal pair exist that distinguishes Đ from DŽ? A minimal pair is a pair of words that sound identical except for the sound we want to contrast - in English, "sat" and "chat" are a minimal pair contrasting /s/ with /tʃ/ (or č if you prefer).
English does not have any concept of a contrast between a 'soft' J and a 'hard' J (or a 'soft' "ch" or a 'hard' "ch"). (Though again, that doesn't mean we don't make a distinction - it just means that if we do, we don't realize we're doing it.)
I am familiar with a similar distinction in Mandarin Chinese, where the soft sound is spelled with pinyin "j" as in beijing and the hard sound is spelled "zh" as in zhongguo, but the contrast isn't perfect -- there are no minimal pairs, and in fact there is no context which would allow a free choice between either sound. If you know the vowel that follows the sound, then you also know whether the sound will be soft or hard. Is that true for Croatian?
I'm surprised at your answer wrt use of the tongue -- in Mandarin "j", the part of the tongue that makes contact with the roof of the mouth is the middle, and in "zh", the part of the tongue that makes contact with the roof of the mouth is the tip.
Not the parent, but I think you might be interested in reading about South Slavic languages [1], palatalization of these [2], and development of Serbo-Croatian [3], as well as Gaj work on the alphabet [4]. It's easy for someone who operates on a daily basis to hear the difference between sounds and wrote it correctly but for other people, especially those who live in different language group (Germanic vs Slavic groups) might have difficulties. But that's rather obvious, innit?
Đ, đ and DŽ, dž letters have counterparts in Polish in dź and dż digraphs and are used to represent same harder and softer sounds.
> You think an English word might use either sound based on the sounds that surround it?
I don't know.
> does a minimal pair exist that distinguishes Đ from DŽ
Yes. Đak - DŽak (pupil / bag). The latter is though archaic and possibly loaned from turkish.
> English does not have any concept of a contrast between a 'soft' J and a 'hard' J
English does not have a concept of phonetic alphabet, so that's that. Same sound has multiple realizations in writing. Though I believe that the "soft/hard" distinction is between G and J: compare Gina, gigantic and Jake, jealous.
> I'm surprised at your answer wrt use of the tongue
>> English does not have any concept of a contrast between a 'soft' J and a 'hard' J
> English does not have a concept of phonetic alphabet, so that's that. Same sound has multiple realizations in writing.
Well, no, that doesn't matter at all. There are some sounds that English treats as being different from each other, and there are other sounds where no distinction is made, even if one might exist in reality. Spelling is an orthogonal concern. English speakers are only aware of one "J" sound, which is conventionally interpreted as the IPA /dʒ/.
> I believe that the "soft/hard" distinction is between G and J: compare Gina, gigantic and Jake, jealous.
English speakers do not intentionally make any distinction. But if a distinction did exist, it would have to be based on pronunciation and not spelling. It's easy to disprove the "G"/"J" theory; Gene is a man's name and Jean is a woman's name, but they are pronounced absolutely identically. The spelling is telling you the historical pronunciation of an ancestral word, which isn't relevant to the modern pronunciation of the modern word.
> in Mandarin "j", the part of the tongue that makes contact with the roof of the mouth is the middle
Never realized this. And after a few minutes of tounge-hyperconscious trying, I think some of us need some serious retraining to physically pull that off.
The fact that assuming this position necessarily thrusts the tongue very far forward in the mouth explains why the Mandarin palatal consonant series (q/j/x) can only be followed by the front vowels, /i/ or /y/.
If you're interested in learning to produce a foreign sound, I strongly recommend getting recordings (or live examples) to listen to and imitate. Working off a description will never quite get you all the way there.
I would say it's actually closer to DŽ; I just couldn't figure out the English equivalent late at night :->
I think Angelica, or perhaps Jeans or Jacob may be closer to Đ?
>>Does it vary by speaker?
Yes; and not only formally - it many parts of ex-Yu, a lot of people can't really distinguish between č and ć; and also dž and đ. (my dad has spoken the language(s) as a native for 75 years, yet though much more of a Canadian who barely remembers my initial tongue, I can still spell words like ćevapčići more consistently than him - some people just have a correct feel and others don't)
The funny part is that to this day, many places still show ¥ instead of \ in Japanese locales, even with UTF-8. Starting with the Windows command line prompt.
And on the opposite side, in a terminal, on macOS, hitting the ¥ key inputs a \, but not in other applications (including vscode), where you need to use option+¥ for a \.
(BTW, I have no idea how to type ¥ in the terminal on macos with a Japanese keyboard)
And conversely, because those users/developers see ¥, they think everyone else does too. I regularly get emails from Japanese shops with currency denominated in \.
I know a couple of people that went out of their way to have the yen backslash on their PC. It certainly is charming in a way. Kind of like how email addresses used to be written like:
Wow. I was today years old when I learned that Japan considers ¥ as the canonical directory separator.
I always saw this when I switched to Japanese and thought it was a display quirk of being the English version of whatever software and that a "real" version of Japanese Windows, or whatever, would have \'s.
Never stopped to consider that ¥ might be considered the canonical separator.
I remember changing my Windows XP machine to Japanese in order to learn the language (protip: try to learn the characters for the common things before doing this) and suddenly all my file paths had ¥ in them.
I thought I must have messed something up, it was very jarring to see. I think the yens everywhere were more of a reason for me to revert the change than the fact that I essentially locked myself out of changing any of the settings that I had not yet memorised...
More accurately, this is one of last artifacts from ISO/IEC 646 which allowed several punctuations to be replaced with local characters in domestic variants. Currency characters in particular commonly replaced # or $, but East Asian variants instead chose \ and that got stuck in their own multibyte character encodings.
I remember seeing this for the first time when I did a short exchange month in Japan. A friend of my host family asked me to fix their PC and install a printer, and when I saw yen signs all over the operating system I first thought he accidentally caught a bad virus.
Took me a while of banging my head against why "\" (as in C:\) is not working to realize that yen = \. Still had no idea why this was actually the case
Interestingly, Russian DOS/Windows, despite having an entire Cyrillic alphabet in the upper part of the codepage, still used \ as the path separator. One weirdness is that we read drive letters as Latin, so C: is "disk tse".
Right, and with this assumption, some websites use it to list price on items, which makes things bit confusing at times.
For example:
\5000
\6000
\2000
I think mobile (and web browsers, too) tend to not display these as yen symbol even when the locale is set to Japanese, so they are displayed as a backslash followed by numbers.
How to people in general feel about the backslash (\) in the non-english speaking world?
Me personally I hate it. It is OK for escaping (as it doesn’t happen that often) but for things like typing out LaTeX or paths on Windows is awful to an extend where I would rather not write LaTeX outside of my custom keyboard (Caps Lock as third level shift and Emacs key-chord of ðö together [icelandic keyboard] types \).
On Russian keyboard layout backslash (\) is in the same position as on US keyboards (electronically; the actual position may differ as the shape and arrangement of Enter, Shift and Backspace keys is not standardised here), the forward slash (/) is entered as Shift+\
As I understand, that layout was designed for MS-DOS by the group of computer enthusiasts that joint USA-USSR company Dialog gathered in 1990 by request of Microsoft during Bill Gates' first official visit to Moscow, and these enthusiasts were basically all programmers. Hence the layout they created is based on a US English for a convenience of keeping some punctuation marks in the same places. That makes it horrible for Russian typography, but such is life here.
I don't care either way. But that's probably because my native language of Thai have completely different keyboard layout that require me to switch to English layout anyway for backlash and other file path.
To clarify for people who only ever have seen English (or English derived) keyboards. The backslash (\) is usually bound to a third level shift. On some Windows you can reach third level shift with either a Ctrl + Alt or a single AltGr. On most linuxes AltGr is the only way to reach third level shift. This is a problem since AltGr is usually on the same side (right hand side) of the keyboard as the \ key, so you usually have to do some finger gymnastics to type it.
On Macs Option double functions as a third level shifts which causes a whole different set of issues as many keyboard shortcuts also use the option key, so typing \ becomes ambiguous in some contexts.
This problem does not exist for Cyrillic layout, since we always have two keyboard layouts (qwerty, йцукен) and switch between them. Press-release shift, then ctrl-shift, lately caps lock became fashionable. Clueless software such as KDE offers cumbersome switching hotkey such as ctrl-shift-K, which nobody uses in favour of a single easy combo.
So, if we can't find [ or } or / on cyrillic layout, we just switch to latin and punch it. I've never seen a latin layout which did not have '\' readily available.
When you need to type a path, it almost always contains some latin letters ("/usr" or "C:\") so you will have to switch regardless.
Still, we have one more variable to occupy our mind, "what's the current keyboard layout I'm on". There were even software which did automatic layout switching based on dictionary heuristics.
йцукен is also very efficient key placement-wise so we don't have anything like Dvorak layout. What's a bummer is ',' which requires pressing shift.
I didn't always know that [ ] are immediate keys and { } are shift characters on a US keyboard. I had internalized the AltGr pain as something that just came with the territory of programming.
I switched to us-altgr-intl (so now my native odd characters are altgr+whatever and otherwise en-us) and haven’t touched my native layout for 10y or so.
It's pretty cool. When you think about it, the backslash is kind of a useless character, apart from windows paths and escapes I can't think of much use for it, both of which are rather arbitrary. As far as I know it has no real use in writing. I wouldn't be opposed to replacing it with something else and making room for something useful on the keyboard.
I'm actually curious about the history of the backslash character. It does seem that it's something that isn't needed, and is not part of normal English writing, so I wonder how it made it into ASCII. Was it already in regular use in teletype? Was it used in technical writing in the 70's? Was it useful for formatting telegrams or something?
fascinating. So the original ASCII was already conceptualized in terms of composed characters, that's kind of amazing. Maybe it was viewed as "saving" a bit, only having to introduce one character instead of two. Shows the importance of programming language design even that early in computing history.
Trigraphs are ignored by default by clang and gcc, and they have been removed from C++, so you might find that in practice they don't work as well as you might expect.
Scrolling down, I read that the Chromium team put out a patch that, if the site wishes, disallows "view source"? That's pretty disturbing. I taught myself HTML by viewing source. And sometimes I just want to see what they're doing.
A few years back, I wrote a CTF challenge around this quirk of SHIFT_JIS. It used a python MySQLdb connection set to SHIFT_JIS mode and a custom naïve mysql escape function. The trick was to use a yen symbol and have it get interpreted as an unescaped backslash, leading to a SQL injection. Also it was all over websockets just to be annoying.
There's a few nice writeups from it:
https://www.kernelpicnic.net/2016/03/06/BKPCTF-Wonderland-Go...
https://0day.work/boston-key-party-ctf-2016-writeups/
https://security.szurek.pl/en/boston-key-party-ctf-2016-good... (this one has the original challenge source)