Solved

Encodings, etc

Posted on 2004-09-17
6
197 Views
Last Modified: 2010-03-31
I'm searching for the method used to write and read cyrillic characters from a standard text file using BufferedReader/BufferedWriter.  I've been unable to find any useful information so far and my attempts at writing and saving in different encodings has failed so far.  

Any ideas?
0
Comment
Question by:lomidien
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 12085499
If you're reading, you'll need to know what encoding has been used
0
 

Author Comment

by:lomidien
ID: 12085516
All the files I'll be reading will be created by myself....all in Unicode format.  Man alive CEHJ, you're always fast to respond!!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12085531
String encoding = "x;
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream("x.txt"), encoding)); //
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
ID: 12085556
OK - so you know what 'x' is ! ;-)

String encdoing = "UTF8";
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("x.txt"), encoding));
0
 

Author Comment

by:lomidien
ID: 12085590
Perfect,

Thanks a bunch!  Right on the money!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12085615
8-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question