Thanks Clark. See my response below --

On 4/5/07, Clark Christensen <[EMAIL PROTECTED]> wrote:
I hate it when the CGI transaction clobbers characters.

so, I am not the only one. Phew.

You can set the content-encoding in the HTML to UTF-8, and it
might help, but I think the conversion from the urlencoded value
is dependent on the web server platform's encoding (OS codepage,
app platform settings, etc.)

Plus, you run the risk of a user forcing the browser's encoding to
something other than what you intended.


ok. So there are two issues -- the web dev side and the
ess-que-ell-ite side. I will tackle the former separately. Re. the
latter, I am pretty confident in knowing that our little db doesn't do
any editorializing on its part. Whatever you put in, it spits the same
thing back out.

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?


----- Original Message ----
From: P Kishor <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Thursday, April 5, 2007 7:39:33 AM
Subject: [sqlite] storing funky text in TEXT field

Seems like a basic question, but I can't figure out a definitive
answer to this. I want to store UTF-8 characters in a TEXT field,
y'know, things like umlauts and accents and that Norwegian slashed-O
thingy, perhaps even South Asian Devnagari. The documentation says
about text -- "TEXT. The value is a text string, stored using the
database encoding (UTF-8, UTF-16BE or UTF-16-LE)."

So, what do I do? Do I have to declare the database encoding while
creating the database? I find that if I update the database table via
a web-form, these funky characters get clobbered. Is this something
that I have to account for in my web application? How?

Many thanks in advance.

--
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]
-----------------------------------------------------------------------------




--
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]
-----------------------------------------------------------------------------

Reply via email to