Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Text file encoding problems...

807569Sep 11 2006 — edited Sep 12 2006
Hi all,

First of all, i use JDK1.5, my dev environment is Eclipse 3.2 and my os is Win**** XP Pro.

I have a real prob. I read a txt file DETAILx.TXT (replace x by any number) using jakarta commonIO.FileUtils without problems. I put all datas in a String and copy the String to a unique DETAIL.TXT (Merging txt file to make a big one). I try first with encoding "ISO-8859-1" and tried after with "windows-1252".

When i open the DETAIL.TXT file with a text editor (Textpad), the file format is MAC (?!?!?!?!?), encoding ANSI... When i try to run a batch file that process data from DETAIL.TXT to a oracle database, the batch fail due to the file format... If i do manually save as DETAIL.TXT, specifying the file format to PC, the batch file run well...

Did somebody have a clue or did somebody know a tools to convert text file into a PC - ISO-8859-1 valide file?

thanks a lot,

vince
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 10 2006
Added on Sep 11 2006
7 comments
743 views