when compiling: unsupported char 0xc2

Markku Sukanen daikane at messiah.ath.cx
Tue Aug 19 05:04:06 PDT 2008


Tue, 19 Aug 2008 06:51:25 -0400, bearophile wrote:

> Markku Sukanen:
>> I'm usually using 'vim' (or 'gvim') for editing source codes, but now
>> as learning D as new language, came against a problem with '|' (the
>> vertical bar) in source code.  Whenever dmd encounters a '|' in code
>> (outside string literals), it errors out with i.e.:
>>     ...somesource.d(84): unsupported char 0xc2
>> So, for now, have had to put i.e. "if (a == 2 ||Â b == 3)" to separate
>> if/ else's.
> 
> The '|' char is 124, not 0xc2 (that is 194 in decimal). I have no
> problems using the vertical bar in my D source code. You probably are
> doing something wrong, if you take a look at this post you can see your
> editor is using something past 7-bit ASCII, try a different editor.
> 
Hmm, after checking my source code and my own post to this newsgroup with 
a hexedit, I think it's not just editor issue... there's an invisible 
"0xC2" character following the 2nd '|' in my own post and the source 
code...

Not a D, issue. Heh, sry - should've thought checking the hexdump earlier.



More information about the Digitalmars-d mailing list