Actually UTF-8 is the better choice compared to UTF-16. I would start turning on UTF-8 as the character set on your web server and ensure that it is also specified as the document character set in all generated HTML pages. This gives browsers a hint about the text encoding to use to render pages.
Mike -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von P Kishor Gesendet: Donnerstag, 5. April 2007 20:19 An: sqlite-users@sqlite.org Betreff: Re: [sqlite] storing funky text in TEXT field On 4/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "P Kishor" <[EMAIL PROTECTED]> wrote: > > > > But, the line I quoted in my OP, namely "TEXT. The value is a text > > string, stored using the database encoding (UTF-8, UTF-16BE or > > UTF-16-LE)." is confusing me. What is this "database encoding" and > > where do I have to tackle this? > > > > Do I have to turn on some kind of magic pragma setting? How? Where? > > And, which one is preferable? UTF-8 or UTF-16, or one of the 16 > > variants, BE/LE? > > > > http://www.sqlite.org/pragma.html#pragma_encoding > well, that was easy. My apologies for coming so close to the answer myself but not really looking. Ok, so here is the follow-up question, which hopefully will not be so "clueless" as the first one. I entered "pragma encoding;" for a db I already have -- it returns UTF-8, which seems like the default setting. Which explains why when I first created the db by inserting data from an existing file, I got all the funky letters. But, when I updated the same data via my web app, those funky letters got clobbered. So, I have to create a better web application. However, I do want a starting advice -- is UTF-8 good enough for what I am concerned about or should I start learning about UTF-16 BE/LE? -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation http://www.osgeo.org/education/ --------------------------------------------------------------------- collaborate, communicate, compete ===================================================================== ---------------------------------------------------------------------------- - To unsubscribe, send email to [EMAIL PROTECTED] ---------------------------------------------------------------------------- - ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------