On 10 Jul 2010, at 23:13, Martin wrote:

> It would be nice if there was(maybe there is) some way, of telling the 
> compiler that the string is to be treaded as binary-data. Maybe like:
> 
> {$codepage utf8}
> const
> {$codepage binary} // temporary change
>  s1: shortstring = 'éà';
> {$codepage utf8} // back to original
> s2: ansistring = #$094#$06D;
> s3: ansistring = #267#543;

No, that is not possible. A file always has only one code page.

If you want the compiler not to interpret any of the character literals, you 
can do so by not using any {$codepage xxx} directive (and not including any BOM 
either). Then you can save the file in your editor using any code page you 
want, and the compiler will treat the characters as sequences of byte literals.


Jonas_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to