How long has katakana been used as today, to represent non-Japanese words, onomatopoeia et al.? But specifically, has this usage been around since before U.S. Commodore Matthew Perry arrived in Japan in the 19th century? I read in Goto-Jones' A Very Short Introduction to Modern Japan that Japan around this time was very insular and distrusting of foreigners, Perry's arrival being a catalyst that changed this. So I assumed that around that time, the Japanese wouldn't have used katakana to represent foreign words if they didn't associate with other countries anyway.
My understanding is that until the Meiji era, through the early 1900's, foreign words were most often written in kanji. Perhaps the sudden exposure to foreign cultures and the rise of the merchant class and marketing led to it's emergence as the definitive way to write foreign non-Chinese words. As the script was imported centuries ago, it is possible that it has had always been widely regarded as non-native.
- 檸檬 (レモン) lemon
- 仏蘭西 (フランス) France
- 麦酒 (ビール) beer
My informal understanding is that hiragana was originally "woman's alphabet" and katakana was "man's alphabet." Now, it has evolved to hiragana to represents Japanese native words and grammar parts while katakana represents foreign words. Of course, sometimes katakana is used instead of hiragana just to be rude or funny or whatever. For example, ゴメン was used instead of ごめん just to be less polite or whatever.
Just a fun tidbit I learned myself......