File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Reg : Encode in UTF-8 with BOM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Reg : Encode in UTF-8 with BOM" Watch "Reg : Encode in UTF-8 with BOM" New topic

Reg : Encode in UTF-8 with BOM

chennai Kumar
Ranch Hand

Joined: Jun 04, 2005
Posts: 72
Hi All,

I am having following problem

How to convert the file in Encode in UTF-8 with BOM in java process.When I want to open the file in the notepad++ , the format shows the Encode in UTF-8 , but not Encode in UTF-8 without BOM.
I used the following code to convert into UTF- 8 , But its not getting the excact output (Encode in UTF-8 with BOM).

Please can you send the sample code to get the excat UTF-8 with BOM

Thanks in Advance

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42956
We don't know what "chaine" is, but what does the "\r\n" have to do with the BOM? The BOM is contained in the first few bytes of the file:
Rob Spoor

Joined: Oct 27, 2005
Posts: 20041

What is BOM?

Ah, Ulf already provided the answer.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Reg : Encode in UTF-8 with BOM
It's not a secret anymore!