Re: [fpc-devel] utf8 reading

2005-03-13 Thread Florian Klaempfl
C Western wrote: Applied. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] utf8 reading

2005-03-12 Thread DrDiettrich
Uberto Barbini wrote: Using natively utf-8 I think is impossible, because the encoding. Support might be implmemented like/in MBCS support. Please note that at every Borland conference there is someone asking for Unicode support since Delphi2... Not only for Delphi ;-) There are several

Re: [fpc-devel] utf8 reading

2005-03-10 Thread Tomas Hajny
On Thu, 10 Mar 2005 08:43:07 +0100, Florian Klaempfl wrote Uberto Barbini wrote: What would be the correct solution? I am showing my ignorance of multi byte characater handling here, but I think it would be to write an escaped sequence as is currently done for wide strings. I don't think

Re: [fpc-devel] utf8 reading

2005-03-10 Thread Uberto Barbini
utf-8 is a unicode string. What do you mean with not escaped Unicode? Memory wasting utf-32? I'd see UCS2/UCS4 as not escaped Unicode. Exactly. I think that UCS2 will suffice to everyone not interested in Vogon poetry! ;)) This means to have 2 byte chars and related strings, all string

Re: [fpc-devel] utf8 reading

2005-03-10 Thread Florian Klaempfl
Uberto Barbini wrote: utf-8 is a unicode string. What do you mean with not escaped Unicode? Memory wasting utf-32? I'd see UCS2/UCS4 as not escaped Unicode. Exactly. I think that UCS2 will suffice to everyone not interested in Vogon poetry! ;)) This means to have 2 byte chars and related strings,

Re: [fpc-devel] utf8 reading

2005-03-10 Thread Uberto Barbini
UCS-2 or UTF-16 how it called by the unicode consortium is escaped as well and you've to take care of it in your code. mmh, no. UCS-2 is different from utf-16 (which is escaped), but you cannot represent all utf characters (see the case of Vogon poetry). See:

RE: [fpc-devel] utf8 reading

2005-03-10 Thread Marc Weustink
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Uberto Barbini Sent: donderdag 10 maart 2005 19:30 UCS-2 or UTF-16 how it called by the unicode consortium is escaped as well and you've to take care of it in your code. mmh, no. yes :) UCS-2 is different from utf-16 (which is

Re: [fpc-devel] utf8 reading

2005-03-10 Thread Uberto Barbini
UCS-2 is different from utf-16 (which is escaped), nope. UCS originally wasn't escaped, but they changed that recently Could you point me to a official document? In the Unicode site I don't find anything. Anyway with escaping UCS2 when UCS2 definition is utf-16 without encoding? Bye Uberto

Re: [fpc-devel] utf8 reading

2005-03-10 Thread Uberto Barbini
On Thursday 10 March 2005 19:51, Uberto Barbini wrote: UCS-2 is different from utf-16 (which is escaped), nope. UCS originally wasn't escaped, but they changed that recently Could you point me to a official document? In the Unicode site I don't find anything. Anyway with escaping UCS2

Re: [fpc-devel] utf8 reading

2005-03-10 Thread C Western
This discussion has inspired me to think a little more about what should be done in this specfic context, and I think the attached patch should do it. It is a more drastic patch than the previous one, and I don't have any widestring test material, but it passes some simple tests. I have copied

Re: [fpc-devel] utf8 reading

2005-03-09 Thread Florian Klaempfl
C Western wrote: Can I offer the attached patch for reading utf8 strings from resource files? It simply converts the utf string to a normal string by discarding the high bits, What would be the correct solution? but I had some files from Delphi or Kylix that were otherwise unreadable. Colin

Re: [fpc-devel] utf8 reading

2005-03-09 Thread C Western
C Western wrote: Florian Klaempfl wrote: C Western wrote: Can I offer the attached patch for reading utf8 strings from resource files? It simply converts the utf string to a normal string by discarding the high bits, What would be the correct solution? I am showing my ignorance of multi byte

Re: [fpc-devel] utf8 reading

2005-03-09 Thread Uberto Barbini
What would be the correct solution? I am showing my ignorance of multi byte characater handling here, but I think it would be to write an escaped sequence as is currently done for wide strings. I don't think the current OutChars function is quite up to it, as utf8 characters can be 32

Re: [fpc-devel] utf8 reading

2005-03-09 Thread Florian Klaempfl
Uberto Barbini wrote: What would be the correct solution? I am showing my ignorance of multi byte characater handling here, but I think it would be to write an escaped sequence as is currently done for wide strings. I don't think the current OutChars function is quite up to it, as utf8 characters