Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: Problem with Japanese Encoding

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Thanked 0 Times in 0 Posts

    Default Problem with Japanese Encoding

    I am new to ja encoding formats in java. I have a code where I want to save ja lang text in a text file (.vcs - calander attachment). But I get junk characters instead of ja lang texts. I tried a small code snippet which I am not able to get it work.

    String st = "japanese lang text here";
    File fl1;
    fl1 = new File("C:\\test.txt");
    FileOutputStream fos1 = new FileOutputStream(fl1);
    Here this string st comes from another function. I use test.txt file for testing and "SJIS" is the encoding format in java for JA (Shift_JIS). I have attached the source.txt and the result test.txt.

    Thanks for the help in advance.
    Attached Files Attached Files

Similar Threads

  1. Run Length Encoding Problem
    By Scottj996 in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: January 7th, 2010, 07:24 AM
  2. Replies: 1
    Last Post: November 1st, 2009, 09:23 PM