• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Problems With Japanese Text

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm currently writing a flash card program to help with studying Japanese. The program works fine on machines where the Language for non-Unicode programs is set to Japanese in Regional and Language Options. The problem is that setting this to Japanese has an effect on multi-language programs and can unwanted effects such as programs installing or displaying in Japanese. It also reduces the portability of my app and as a flash card program I'd like it to be usable on any PC.

If the language is not set to Japanese, a few things go wrong. First, displaying of the Japanese text I have read in now displays garbage. I was thinking of attempting to store a Japanese font in my project and trying to use that, but I wasn't sure if that's the right way to go about it, or if it would even work. The other problem is that after my program writes all the garbage back to another file, the Japanese text becomes unrecoverable.

Below is the code I use for reading and writing the files. The WordEntry class just stores the Japanese text in a string and the Japanese text is displayed in a JTextArea.

 
Michael Cuoco
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got it to work. I just had to change my input and output to UTF-8 and make sure to save my files in Unicode.


 
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic