is there any way to stop GDC complain about non-utf source encoding?

ketmar via D.gnu d.gnu at puremagic.com
Sat Apr 26 11:56:45 PDT 2014


the thing is: i have a file where i want to use some one-byte 
encodings which looks like "bad utf-8". compiler complains even 
if i'm using that in comments (and i want such encodings in 
one-byte strings too!). can i somehow force it to shut up and 
just accept what i wrote?

yes, i know that "just convert that to utf-8 and it will be fine" 
solution exists. unfortunately, i don't want utf-8 overhead for 
my small gfx library. it using byte strings, and it using codes 
[128…255] to draw some specific chars. i don't want to add 
unicode mapping table to library, i just want the compiler to 
accept non-utf one-byte strings silently when i told it to.

yeah, i know that i can write such strings like this: 
"\xc2\xcc\xd1!". this is not the way i want to write clear text, 
and there is no way to mixin code without mixin(), so i can't 
write compile-time macro for it too.

tnx.


More information about the D.gnu mailing list