EUREKA! Ok I got it working now. It turns out my source was UTF-8 Encoded, so even when i used the utf-16 functions it wasnt comming out right. I am now doing a converstion in delphi from UTF-8 to UTF16 and using all UTF-16 sqlite functions as recommended.
Thanks a million for all your help, it was all your suggestions which lead me to the solution. Much appreciated. Have a good weekend. S On 12/8/06, Trevor Talbot <[EMAIL PROTECTED]> wrote:
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] -----------------------------------------------------------------------------