• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

verify encoding

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic