Unicode BOM and endianness

Tim Locke root at vic-20.net
Fri Aug 4 04:44:21 PDT 2006


On Fri, 4 Aug 2006 14:15:00 +1000, Derek Parnell
<derek at nomail.afraid.org> wrote:

>On Fri, 04 Aug 2006 00:36:21 -0300, Tim Locke wrote:
>
>> How do I acquire and determine the BOM and endianness of a file I am
>> reading?
>> 
>> Thanks
>
>You might check out http://en.wikipedia.org/wiki/Byte_Order_Mark

I'm sorry but I wasn't clear in what I am looking for.

I'm looking to be able to open a file and have D automatically tell me
which format it is, e.g. UTF-8, UTF-16LE, UTF-16BE, etc. without my
having to code it. Ideally I would like to be able to read any unicode
or ascii file and have D automatically detect its type and allow me to
read it into whatever format I want, such as char, wchar, dchar.



More information about the Digitalmars-d-learn mailing list