Hector Posted September 29, 2008 Share Posted September 29, 2008 I've decided to write myself my own flashcard program for Japanese, but I cannot figure out how to get the compiler to recognize Japanese characters. I've tried switching the character encoding to Cp930 (all I could find that is supposed to work) but that makes the rest of my code cease working. I've only been trying to get the Japanese to work with println functions so far. Anyways, I was wondering if there was anyone around here who knows how to do this sort of thing in Java--or if anyone knows how to do it in C++. Thanks Quote Link to comment Share on other sites More sharing options...
po! Posted September 29, 2008 Share Posted September 29, 2008 this isn't really a direct answer to your question, but this sort of thing would probably be easier as a web app.. like something in PHP or javascript or somethin. you could just have a text file as a "database" and parse it as a space delimited text array, and the browser would take care of displaying the characters Quote Link to comment Share on other sites More sharing options...
djpretzel Posted September 29, 2008 Share Posted September 29, 2008 I've decided to write myself my own flashcard program for Japanese, but I cannot figure out how to get the compiler to recognize Japanese characters. I've tried switching the character encoding to Cp930 (all I could find that is supposed to work) but that makes the rest of my code cease working. I've only been trying to get the Japanese to work with println functions so far.Anyways, I was wondering if there was anyone around here who knows how to do this sort of thing in Java--or if anyone knows how to do it in C++. Thanks Externalize strings into .Properties files, Unicode format text files. Read them in as UTF-8. Might need to do this hack: http://www.thoughtsabout.net/blog/archives/000044.html. You definitely want UTF-8, as that will allow for most any charset, incl. Japanese/Chinese. Also, FYI: http://jlanguagelearn.com/ this isn't really a direct answer to your question, but this sort of thing would probably be easier as a web app.. like something in PHP or javascript or somethin. you could just have a text file as a "database" and parse it as a space delimited text array, and the browser would take care of displaying the characters Yes and no, for all sorts of reasons... PHP is actually not as Unicode-friendly as you'd think, there are separate methods/stuff you need to do, persisting to a text file can get ugly, doing things like timers and basic display stuff might be easier in Swing/AWT depending on what he's got in mind. I'd really hesitate to always recommend the web-based route, especially for what amounts to a personal, desktop-oriented business case. Quote Link to comment Share on other sites More sharing options...
phill Posted September 29, 2008 Share Posted September 29, 2008 I've decided to write myself my own flashcard program for Japanese, but I cannot figure out how to get the compiler to recognize Japanese characters. I've tried switching the character encoding to Cp930 (all I could find that is supposed to work) but that makes the rest of my code cease working. I've only been trying to get the Japanese to work with println functions so far.Anyways, I was wondering if there was anyone around here who knows how to do this sort of thing in Java--or if anyone knows how to do it in C++. Thanks If you are running this without a gui, you have to let the RTE know what encoding to use, the switch should be something like '-Dfile.encoding=UTF8'. Quote Link to comment Share on other sites More sharing options...
kitty Posted September 30, 2008 Share Posted September 30, 2008 Save yourself the trouble. Here's one I've been using recently: http://www.dragonmedia.us/programs/kana.swf It has both hiragana and katakana. The user interface is confusing at first but it's a great flash once you get used to it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.