A few general thoughts

Denis Koroskin 2korden at gmail.com
Fri Apr 29 01:42:59 PDT 2011


On Fri, 29 Apr 2011 12:30:59 +0400, lenochware <lenochware at gmail.com>  
wrote:

> I was not happy with error message "invalid utf8 character". I am using
> international character in my strings and compiler gives me this  
> message. Of
> course, I can switch my source codes into utf8, but here are few tricks  
> which
> can be done with plain ascii. I draw characters in graphic, using OpenGl  
> by
> calling glCallLists(somestring.length, somestring.ptr);
> It will take somestring as array of indexes of displaylists where each
> displaylist will draw one character and his id=ascii code. But because  
> this
> restriction it is not possible. And it is error, not
> warning and cannot be disabled ANY WAY (as far as I know). You can say:  
> Blah,
> utf8 is generally good thing, and this is minor unimportant issue, but I  
> want
> just illustrate that restriction can create unexpected problems and  
> that's
> because I like if I have choice.
> (And again this was not about delete or utf8, but general thougth)
>
> Sorry for long post.

You can use import("file.txt"); to import files (text or binary) at  
compile time.

You source code however *SHOULD* remain in UTF-8 (with ASCII being a  
subset of it).


More information about the Digitalmars-d mailing list