This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
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: 39547
    
  27
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 - updated with new look and Ping home screen widget
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reg : Encode in UTF-8 with BOM
 
Similar Threads
What is Encoding and character conversion
Character encoding using Java
Encode Data
Null teminating a string
Coversion of ResultSet