[Haskell-cafe] I/O and utf8

Bayley, Alistair Alistair_Bayley at ldn.invesco.com
Tue Jan 10 05:42:29 EST 2006

> From: haskell-cafe-bounces at haskell.org 
> [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Bulat Ziganshin
> i have the question about this issue - i also want to provide
> autodetection mechanism, which relies on first bytes of text files to
> set proper encoding. what is the standard rules to encode utf8/utf16
> encoding used for text in file in these first bytes?

Are you asking about the byte-order-mark in UTF encodings?

Note that UTF8 files typically lack the BOM, as UTF8 is meant to be
backwards-compatible with US7ASCII, I think. Windows Notepad is one of
the few programs that will insert it if a text file is saved as UTF8.

Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.

More information about the Haskell-Cafe mailing list