OT: Problems with Inserting Odd Characters into PostGreSQL

Trevor DeVore lists at mangomultimedia.com
Wed Dec 15 08:49:36 EST 2010


On Tue, Dec 14, 2010 at 4:40 PM, Web Admin Himalayan Academy <
katir at hindu.org> wrote:

>  On 12/14/10 2:30 AM, Trevor DeVore wrote:
>
>> Personally I configure PostgreSQL to use UTF-8. I then encode any strings
>> I
>> insert and decode any strings I get out.
>>
>>  I checked on our server and I have all the databases set for UTF-8...
>
> I'll try some tests... using uniEncode.
>
> I presume this needs to be done for all strings.


Yes. PostgreSQL will become upset if you try to pass in data that is not
UTF-8 encoded and will return an error.


> What I don't understand is what happens when you decode the data on the way
> out and pass it to, e.g.
>


> <p> [some decoded string, with a smart quote or mDash or German umlaut]</p>
>
>  what will happen. But that's not a Live Code issue.  if the encoding for
> the page is UTF-8 also, then maybe you don't have to decode at all?
>

Correct. If your web page uses UTF-8 as the defined encoding then there is
no need to modify the data at all, except for the escaping of special HTML
characters.

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers:
http://revolution.bluemangolearning.com



More information about the Use-livecode mailing list