utf « API « Java I/O Q&A





1. Problem writing an UTF- Stream to File    forums.oracle.com

Actually, it's the first three bytes that don't belong. When you see at the beginning of a file, it means you have two problems: (1) the file is encoded as UTF-8 with a [BOM|http://en.wikipedia.org/wiki/Byte_Order_Mark], and (2) you're using something other than UTF-8 to decode it. The former is a problem because the BOM is supposed to be stripped away by ...