Re: [fpc-pascal] Unicode strings

2010-12-31 Thread Juha Manninen
Jonas Maebe kirjoitti tiistai 28 joulukuu 2010 12:31:08: Delphi's UnicodeString supports holding strings with arbitrary encodings (not just UTF-16), along with transparent re-coding of strings when assigning them to unicodestrings whose codepage has been statically defined at compile time.

Re: [fpc-pascal] Unicode strings

2010-12-31 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: On 28 Dec 2010, at 11:22, Juha Manninen wrote: What is the difference between the current FPC's UnicodeString and Delphi's UnicodeString? I am confused with all these string types and encodings. Delphi's UnicodeString supports holding

Re: [fpc-pascal] Unicode strings

2010-12-31 Thread Juha Manninen
Marco van de Voort kirjoitti perjantai 31 joulukuu 2010 13:04:27: In our previous episode, Jonas Maebe said: Delphi's UnicodeString supports holding strings with arbitrary encodings (not just UTF-16), along with transparent re-coding of strings when assigning them to unicodestrings whose

Re: [fpc-pascal] Unicode strings

2010-12-31 Thread Vincent Snijders
2010/12/31 Juha Manninen juha.mannine...@gmail.com: UTF-16 needs codepages, too. I don't think so. What would a code page be used for with UTF-16. UTF-16 itself is already an encoding, implictly stating one and only one code page, if it can be named a code page. Vincent

Re: [fpc-pascal] Unicode strings

2010-12-31 Thread Marco van de Voort
In our previous episode, Juha Manninen said: Widestring (refcounted 2-byte type) , it is the ansistring type (1-byte type) that gets codepage support. UTF-16 needs codepages, too. I think only the 4-byte char type (is it UTF-32) would solve all encoding problems. codepageencoding All

Re: [fpc-pascal] Unicode strings

2010-12-31 Thread Marco van de Voort
In our previous episode, Juha Manninen said: What I have understood so far: WideString uses UTF16 encoding. It is managed by Windows and so is not reference counted by Delphi or FPC under Windows. However it is reference counted by FPC on other platforms. Then FPC has UnicodeString which is

[fpc-pascal] Unicode strings

2010-12-28 Thread Juha Manninen
Hi What I have understood so far: WideString uses UTF16 encoding. It is managed by Windows and so is not reference counted by Delphi or FPC under Windows. However it is reference counted by FPC on other platforms. Then FPC has UnicodeString which is identical with WideString except that it is

Re: [fpc-pascal] Unicode strings

2010-12-28 Thread Jonas Maebe
On 28 Dec 2010, at 11:22, Juha Manninen wrote: What is the difference between the current FPC's UnicodeString and Delphi's UnicodeString? I am confused with all these string types and encodings. Delphi's UnicodeString supports holding strings with arbitrary encodings (not just UTF-16), along