Re: encoding advice requested - Mailing list pgsql-general

From Marcus Engene
Subject Re: encoding advice requested
Date
Msg-id 45587BD9.5080105@engene.se
Whole thread Raw
In response to Re: encoding advice requested  (Rick Schumeyer <rschumeyer@ieee.org>)
List pgsql-general
Rick Schumeyer skrev:
> I will have to try the WIN1252 encoding.
>
> On the client side, my application is a web browser.  On the server
> side, it is php scripts on a linux box.  The data comes from copying
> data from a browser window (pointing to another web site) and pasting it
> into an html textarea, which is then submitted.
> Given this, would you still suggest the WIN1252 encoding?

In my setup I compiled php with
--enable-zend-multibyte
...which makes all strings unicode internally (I suppose they use
wchar_t instead of char or something). Thus mb_*() are [from what I can
tell] not necessary [for me] anymore. Do use a fairly recent php, not
only for bind variables in the pg api.

In php.ini i've got
default_charset = "utf-8"
mbstring.internal_encoding = UTF-8;

in the html head:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

The db is in utf-8.

Flawlessly it has saved everything I've tossed at it, including all
sorts of apostrophes. I've copy & pasted chinese, hebrew, swedish,
arabic... texts into <textarea> with no other problem that hebrew and
arabic makes most sense written from right to left ;-)

Best regards,
Marcus

pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: chop off non-meaningful digits
Next
From: "SunWuKung"
Date:
Subject: Re: chop off non-meaningful digits