• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

verify encoding

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I execute an application on unix-aix that should produce a file
with windows encoding.
This is because the file should be used for an windows application.
The code look something like this:
===============================================================
FileOutputStream fos = new FileOutputStream("write1.txt");
BufferedWriter out1
= new BufferedWriter(new OutputStreamWriter(fos,"Cp1252"));
out1.write("Line1");
out1.newLine();
out1.write("Line 2");
out1.close();
===============================================================
This executes fine, but how can I verify that the file created
is actually encoded as Cp1252 ?
I suspect that it's not !

kind regards
Per Lovdinger

 
Grow a forest with seedballs and this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic