Re: [fpc-pascal] weird printout of char

2012-11-05 Thread ik
On Mon, Nov 5, 2012 at 5:38 PM, Jonas Maebe wrote: > > ik wrote on ma, 05 nov 2012: > > >> On Mon, Nov 5, 2012 at 4:39 PM, Jonas Maebe >> wrote: >>> >>> >>> On 05 Nov 2012, at 15:25, ik wrote: >>> >>> I have a program like this: >>> >>> - >>> program print; >>> begin >>> writeln(#$d790);

Re: [fpc-pascal] weird printout of char

2012-11-05 Thread Jonas Maebe
ik wrote on ma, 05 nov 2012: On Mon, Nov 5, 2012 at 4:39 PM, Jonas Maebe wrote: On 05 Nov 2012, at 15:25, ik wrote: I have a program like this: - program print; begin writeln(#$d790); // Should print א [snip] I'm trying to use UTF-8, not UTF-16 ($05d0 is UTF-16 values) #$

Re: [fpc-pascal] weird printout of char

2012-11-05 Thread ik
On Mon, Nov 5, 2012 at 3:41 PM, Ewald wrote: > Try this: (a char is only one byte, you're trying to print a multi-byte > character: print multiple one-byte characters) > WriteLn(#$d7, #$90); Breaking it into two bytes works. > > > On 11/05/2012 03:25 PM, ik wrote: >> Hello, >> >> I have a progra

Re: [fpc-pascal] weird printout of char

2012-11-05 Thread ik
On Mon, Nov 5, 2012 at 4:39 PM, Jonas Maebe wrote: > > On 05 Nov 2012, at 15:25, ik wrote: > > I have a program like this: > > - > program print; > begin > writeln(#$d790); // Should print א > end. > -- > > [snip] > > What am I missing or doing wrong ? > > > a) add "uses cwstring"

Re: [fpc-pascal] weird printout of char

2012-11-05 Thread Ewald
Try this: (a char is only one byte, you're trying to print a multi-byte character: print multiple one-byte characters) WriteLn(#$d7, #$90); On 11/05/2012 03:25 PM, ik wrote: > Hello, > > I have a program like this: > > - > program print; > begin > writeln(#$d790); // Should print א > en

Re: [fpc-pascal] weird printout of char

2012-11-05 Thread Jonas Maebe
On 05 Nov 2012, at 15:25, ik wrote: I have a program like this: - program print; begin writeln(#$d790); // Should print א end. -- [snip] What am I missing or doing wrong ? a) add "uses cwstring" to get a full unicodestring manager in your program b) the unicode code po

[fpc-pascal] weird printout of char

2012-11-05 Thread ik
Hello, I have a program like this: - program print; begin writeln(#$d790); // Should print א end. -- I print this to a file: ./program > file In hex editor the value 3F A0 It also the same on normal terminal. I'm using Free Pascal Compiler version 2.6.0 [2012/05/17] for x86