On 12/7/06, Da Martian <[EMAIL PROTECTED]> wrote:
Yeah I am currently using VirtualTree from Mikes Delphi Gems. Its fully unicode enabled (I beleive). I use WideStrings through out the entire pipeline from xml I recieve into SQLite via the prepare16 back out through column_text16 into virtual tree. Well thats true, the SQL APIs are mapped to return PWideChar which is then copied via System.Move into a widestring as follows:
[ DLL interfaces ]
Previously (before my langauge headaches :-) ) I was doing the above without the APIs ending in 16, and everything was string and PChar in the above layer. The layer that used this class has always had "WideString". I realise your probably not delphi pros, but if you do spot something stupid I am doing I would appreciate any help you can offer.
I've never used Delphi, "but I did sleep at a Holiday Inn last night"... It looks fine to me. To help check it, one thing you can try is writing the result of FieldAsString directly to a file as raw bytes, then in notepad open that with "encoding" set to "Unicode". E.g. something logically equivalent to: size := Length(field) * 2; SetLength(buffer, size ); System.Move(field^, buffer^, size); file.Write(buffer, size); I imagine you don't have to jump through hoops like that, but hopefully you see what I have in mind. If the result looks good in notepad, then you know this layer is fine, so the problem must be closer to the display layer. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------