when compiling: unsupported char 0xc2

bearophile bearophileHUGS at lycos.com
Tue Aug 19 03:51:25 PDT 2008


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.

Bye,
bearophile



More information about the Digitalmars-d mailing list