[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Encodings, etc

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
lomidien
Asked:
lomidien
  • 4
  • 2
1 Solution
 
CEHJCommented:
If you're reading, you'll need to know what encoding has been used
0
 
lomidienAuthor Commented:
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
 
CEHJCommented:
String encoding = "x;
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream("x.txt"), encoding)); //
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
CEHJCommented:
OK - so you know what 'x' is ! ;-)

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

Thanks a bunch!  Right on the money!
0
 
CEHJCommented:
8-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now