std.stream, BOM, and deprecation
Charles Hixson
charleshixsn at earthlink.net
Tue Oct 16 10:13:23 PDT 2012
On 10/15/2012 10:29 AM, Steven Schveighoffer wrote:
> On Sat, 13 Oct 2012 21:53:48 -0400, Charles Hixson
> <charleshixsn at earthlink.net> wrote:
>
>> If std.stream is being deprecated, what is the correct way to deal
>> with file BOMs. This is particularly concerning utf8 files, which I
>> understand to be a bit problematic, as there isn't, actually, a utf8
>> BOM, merely a convention which isn't a part of a standard. But the
>> std.stdio documentation doesn't so much as mention byte order marks
>> (BOMs).
>>
>> If this should wait until std.io is released, then I could use
>> std.stream until them, but the documentation is already warning to
>> avoid using it.
>
> When std.io is released, it will be fully BOM-aware by default (as long
> as you use the purely D versions). The plan from my point of view is for
> std.io be be a replacement backend for std.stdio, with the C version
> being the default (as it must be for compatibility purposes).
>
> -Steve
That sounds good. All of the files I'm interested should have been
converted to utf8 (if they weren't already), but many of them have the
utf8 BOM (so they won't be confused with other non-unicode files). It
sounds like std.io will handle this in a transparent fashion.
More information about the Digitalmars-d-learn
mailing list