Re: [fpc-pascal] Default source encoding

2016-03-31 Thread Mattias Gaertner
On Thu, 31 Mar 2016 14:38:35 +0200 Jonas Maebe wrote: >[...] > There are two separate things: > a) the code page that the compiler uses *if* it has to convert a string > at compile time to a different code page (e.g. because you assign the > string constant to an ansistring(1251), or to a unico

Re: [fpc-pascal] Default source encoding

2016-03-31 Thread Michael Van Canneyt
On Thu, 31 Mar 2016, Mattias Gaertner wrote: On Thu, 31 Mar 2016 14:14:14 +0200 (CEST) Michael Van Canneyt wrote: [...] > What happens on a Russian system cp1251 with a cp1251 AnsiString > literal? > > writeln('Привет'); Careful, writing may change the codepage. Yes, I know. That's why i

Re: [fpc-pascal] Default source encoding

2016-03-31 Thread Jonas Maebe
On 31/03/16 14:12, Mattias Gaertner wrote: On Thu, 31 Mar 2016 13:52:54 +0200 Jonas Maebe wrote: On 31/03/16 13:46, Mattias Gaertner wrote: According to http://wiki.freepascal.org/index.php?title=FPC_Unicode_support#String_constants "the constant strings are assumed to have code page 28591

Re: [fpc-pascal] Default source encoding

2016-03-31 Thread Mattias Gaertner
On Thu, 31 Mar 2016 14:14:14 +0200 (CEST) Michael Van Canneyt wrote: >[...] > > What happens on a Russian system cp1251 with a cp1251 AnsiString > > literal? > > > > writeln('Привет'); > > Careful, writing may change the codepage. Yes, I know. That's why it is important that the compiler uses t

Re: [fpc-pascal] Default source encoding

2016-03-31 Thread Michael Van Canneyt
On Thu, 31 Mar 2016, Mattias Gaertner wrote: On Thu, 31 Mar 2016 13:52:54 +0200 Jonas Maebe wrote: On 31/03/16 13:46, Mattias Gaertner wrote: > According to > http://wiki.freepascal.org/index.php?title=FPC_Unicode_support#String_constants > > "the constant strings are assumed to have code

Re: [fpc-pascal] Default source encoding

2016-03-31 Thread Mattias Gaertner
On Thu, 31 Mar 2016 13:52:54 +0200 Jonas Maebe wrote: > On 31/03/16 13:46, Mattias Gaertner wrote: > > > According to > > http://wiki.freepascal.org/index.php?title=FPC_Unicode_support#String_constants > > > > "the constant strings are assumed to have code page 28591 (ISO 8859-1 > > Latin 1; Wes

Re: [fpc-pascal] Default source encoding

2016-03-31 Thread Jonas Maebe
On 31/03/16 13:46, Mattias Gaertner wrote: According to http://wiki.freepascal.org/index.php?title=FPC_Unicode_support#String_constants "the constant strings are assumed to have code page 28591 (ISO 8859-1 Latin 1; Western European)." Is this true? Yes. Or is the compiler using the system

[fpc-pascal] Default source encoding

2016-03-31 Thread Mattias Gaertner
Hi, According to http://wiki.freepascal.org/index.php?title=FPC_Unicode_support#String_constants "the constant strings are assumed to have code page 28591 (ISO 8859-1 Latin 1; Western European)." Is this true? Or is the compiler using the system codepage? It was added in this revision by Jona