Reading UTF32 files

kris foo at bar.com
Thu Aug 3 22:07:43 PDT 2006


Hasan Aljudy wrote:
> 
> 
> kris wrote:
> 
>> It's perhaps easier to use UnicodeFile instead:
>>
>> # import mango.io.UnicodeFile;
>> #
>> # auto file = new UnicodeFileT!(dchar)("myfile", Unicode.Unknown);
>> # auto content = file.read;
>>
> 
> Ah nice! I didn't know about that.
> I wish someone had told me about it earlier. Are there any tutorials for 
> mango that explain where everything is?
> I don't mean the documentation. I mean something that tells you: "if you 
> want to read/decode files, see the documentation for 
> mango.io.UnicodeFile" for example...

No, but there should be :)

BTW: that should probably read "auto content = file.read();" with 
parens, since otherwise the 'auto' will try to take the function reference


>> Mango typically requires the use of Build to pull in relevant modules, 
>> because the combination of D, libraries, and templates just doesn't 
>> work reliably at this time. If the compiler front-end were to handle 
>> recursive imports natively (like a very simple Build), it would be 
>> great! The changes to do so (for DMD) are minimal ;)
>>
> 
> Yes, that would be great.
> Just let dmd recursivly compile all imported module, and because dmd is 
> so fast, it doesn't matter even if dmd recompiles modules that have 
> already been compiled.
> 
> I always use the -full -clean switches on build anyways.

Me too.

Note that DMD *already* pulls in all imported modules during a 
compilation, and runs one or two stages on each of them ... it just 
doesn't propogate those modules through the latter stages of compilation 
and linking ~ choosing to discard them instead. A flag to include them 
in the compilation and linking stages would be just awesome.



More information about the Digitalmars-d-learn mailing list