<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Martin Schreiber wrote / napísal(a):
<blockquote cite="mid:201101121122.34342.mse00000@gmail.com" type="cite">
<pre wrap="">On Wednesday, 12. January 2011 09.45:47 LacaK wrote:
</pre>
<blockquote type="cite">
<pre wrap="">So where is error ?
1. Is it wrong expectation by LCL, that TField.Text is always UTF8 string
-or-
2. Is it wrong in implementation of TSQLConnectors, which write data
into record buffer (of TStringField) and do not convert them always into
UTF-8 ?
(if data should be always in UTF-8 then it will be good redefine
TField.Text property like "property Text: UTF8String" to be clear, that
we always work with UTF-8 strings)
-or
3. I missed something ? ;-)
</pre>
</blockquote>
<pre wrap=""><!---->MSEgui sqldb version converts to UTF-16 from/to system encoding or utf-8
(selectable by option properties) and uses FPC 16bit UnicodeString to store
string field values in the dataset, the tmsestringfield returns UnicodeString
values. So one can either use utf-8 encoded databaseconnections or
connections with the current system encoding.
MSEgui uses 16 bit UnicodeString everywhere, the conversion from/to system
encoding is done transparently by the FPC unicode/widestring-manager if
necessary.
This is a solution which works now, no additional complicated and possibly
less performant codepage and encoding aware stringtype necessary...
</pre>
</blockquote>
Yes, sounds logicaly to me.<br>
Then you propose same way for TStringField ? (internaly store as
UnicodeString UTF-16 and also TStringField.Text should return
UnicodeString instead of String ? ... what will happens in LCL, when
visual component will read UTF-16 string, will they be translated into
UTF-8 automagicaly?)<br>
-Laco.
</body>
</html>