dtutor.org: a call to action

Tyro[17] nospam at home.com
Tue May 7 15:38:24 PDT 2013


On 5/5/13 9:55 PM, Jonathan M Davis wrote:
> On Sunday, May 05, 2013 20:55:29 Tyro[17] wrote:
>> Which reminds me... how does one create
>> a utf-8 encoded file at the shell prompt?
>
> You'll need to be more specific about what you're trying to do. Are you talking
> about from D or about running commands in the shell? And if you're talking
> about the shell, the answer could depend on the type of shell.

I was talking bout running opening an editor like nano and creating a 
text file that is UTF-8 encoded. I usually look up answers to my 
questions before posting but not this time. Shortly afterward I did a 
search on found the nano user manual which detailed the steps necessary 
to rebuild form source with UTF-8 enabled.

> In general, Phobos assumes that you're operating on UTF-8 files (or at least
> UTF-8 compatible files). All of the file operations using string do UTF-8. You
> have to use ubyte[] to be able to use other encodings. And we don't properly
> deal with BOM stuff right now, which we need to fix at some point.
>
> - Jonathan M Davis
>

Andrew


More information about the Digitalmars-d mailing list