Solved

Encodings, etc

Posted on 2004-09-17
6
194 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
  • 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jar file executable 12 59
couple of eclipse 5 46
JavaFX TableView not displaying correctly 3 58
ejb on wildfly 5 30
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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 arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

831 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