aspose file tools*
The moose likes I/O and Streams and the fly likes File encoding ASCII & UTF8 && ISO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "File encoding ASCII & UTF8 && ISO" Watch "File encoding ASCII & UTF8 && ISO" New topic
Author

File encoding ASCII & UTF8 && ISO

christian leclerc
Ranch Hand

Joined: Apr 08, 2008
Posts: 38
Hello ranch guy's,
I've got a big encoding problems and this is cost me a lot of times for nothing.

Here my problems :

I've got an application that create a report. The report has some french accent like : é
When I test the file in eclipse the repor (witch is an .txt file ) t is encoded in utf-8.
I make an executable jar with maven2 and after running the program with java -jar the report is encoded in us-ascii.

Im on opensuse and the command file -i is giving me the information.

So i already set the default charset to the JVM with several options.
When the code execute I
and the result is UTF-8.
But the file is encoded in text plain us-ascii :

$file-i report.txt
report.txt: text/plain; charset=us-ascii

The same file with eclipse is
$file-i report.txt
report.txt: text/plain; charset=utf-8


Well .. I dont know what to do to make my file to be an utf-8 outside eclipse.

Maven assembly is with some plugins:



an the properties of the project are :



Well, if someone can help me on that, It will be very great because i'm really stuck here.

Best regards,

Chris.







 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File encoding ASCII & UTF8 && ISO