aspose file tools*
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
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
Author

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
Marshal

Joined: Mar 22, 2005
Posts: 42292
    
  64
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: http://en.wikipedia.org/wiki/Byte-order_mark


Ping & DNS - my free Android networking tools app
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

What is BOM?

Ah, Ulf already provided the answer.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Reg : Encode in UTF-8 with BOM