Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Felipe Monteiro de Carvalho
In the Virtual Magnifying Glass I used the following solution: 1> All my strings come from a translations manager 2> When they are updated (because the user selected a different language for example) then I also added the following code: {$ifndef fpc} <<-- here convert all utf-8 strings to ansi

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Jonas Maebe
On 06 Sep 2010, at 15:30, Zaher Dirkey wrote: On Mon, Sep 6, 2010 at 11:16 AM, Jonas Maebe >wrote: The compiler itself can only convert from utf-8 and several ISO code pages into utf-16 at compile time (i.e., change string constants into widestring constants). If you want to convert them t

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Zaher Dirkey
On Mon, Sep 6, 2010 at 8:50 AM, ik wrote: > You can use {$codepage utf8} I think, but if you are using ISO8859-6 > (Arabic right ?) then I'm not sure that it will convert it, but rater treat > it as a UTF-8 > > Ido > > Yes it is Arabic in Windows Win1256, but {$codepage utf8} not worked, it is g

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Zaher Dirkey
On Mon, Sep 6, 2010 at 11:16 AM, Jonas Maebe wrote: > > On 06 Sep 2010, at 01:28, Zaher Dirkey wrote: > > I have unit with Ansi strings but i want to compile it as UTF-8 how to ask >> the compiler to convert it to utf8 before compile it? >> > > The compiler itself can only convert from utf-8 and

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Jonas Maebe
On 06 Sep 2010, at 01:28, Zaher Dirkey wrote: I have unit with Ansi strings but i want to compile it as UTF-8 how to ask the compiler to convert it to utf8 before compile it? The compiler itself can only convert from utf-8 and several ISO code pages into utf-16 at compile time (i.e., chan

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-06 Thread Felipe Monteiro de Carvalho
On Mon, Sep 6, 2010 at 1:28 AM, Zaher Dirkey wrote: > I have unit with Ansi strings but i want to compile it as UTF-8 how to ask > the compiler to convert it to utf8 before compile it? By saying that the unit has ansi strings do you mean that is has some types like: X: ansistring; Or that the t

Re: [fpc-pascal] Compile ANSI unit as UTF8

2010-09-05 Thread ik
You can use {$codepage utf8} I think, but if you are using ISO8859-6 (Arabic right ?) then I'm not sure that it will convert it, but rater treat it as a UTF-8 Ido On Mon, Sep 6, 2010 at 02:28, Zaher Dirkey wrote: > Hi, > > I have unit with Ansi strings but i want to compile it as UTF-8 how to a

[fpc-pascal] Compile ANSI unit as UTF8

2010-09-05 Thread Zaher Dirkey
Hi, I have unit with Ansi strings but i want to compile it as UTF-8 how to ask the compiler to convert it to utf8 before compile it? Thanks in advance -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal