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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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: 66
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: 35237
    
    7
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


Android appsImageJ pluginsJava web charts
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

What is BOM?

Ah, Ulf already provided the answer.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Reg : Encode in UTF-8 with BOM
 
Similar Threads
Character encoding using Java
Coversion of ResultSet
What is Encoding and character conversion
Encode Data
Null teminating a string