Thread: Character Corruption / Encoding Question

Character Corruption / Encoding Question

From
"Bill Willits"
Date:
We have just upgraded our phppgadmin client from v3.5 to v.4.1.3.  Now, when we view special characters in phppgadmin they are displayed incorrectly.  If we update the character field (to a special character), it will not store properly.  Our database encoding is SQL_ASCII.  The same operations work fine in v.3.5 of phppgadmin and with pgadmin III. 
 
Obviously, this is a phppgadmin issue (and I have posted a question to them), but I am just curious what could have changed to cause it, and what if any workaround there would be outside of reverting to old version of phppgadmin or getting a patch.
 
Thanks
Bill Willits

Re: Character Corruption / Encoding Question

From
Ivo Rossacher
Date:
Am Freitag, 30. November 2007 21.07:40 schrieb Bill Willits:
> We have just upgraded our phppgadmin client from v3.5 to v.4.1.3.  Now,
> when we view special characters in phppgadmin they are displayed
> incorrectly.  If we update the character field (to a special character), it
> will not store properly.  Our database encoding is SQL_ASCII.  The same
> operations work fine in v.3.5 of phppgadmin and with pgadmin III.

SQL_ASCII is not an encoding but more the lack of any encoding support. This
is required when you need full control of the encoding stuff. But then all
the clients have to agree and take care by them self for the encoding. This
can not be expected to be stable over several different applications,
installations and releases and is therefore only usefull when really needed
for some reason.
So phpadmin would need to be configured to use the correct encoding for your
setup (I do only have little, aged expirience with phpadmin but I think to
remember that the encoding used is defined by the php installation). From my
point of view it would make more sense to use UTF8 or any other encoding
fullfilling your needs, so the database can convert the encoding from and to
the client encoding for you. However depending of the actual status of the
data in the database it might be some work to convert the data to the new
encoding (it depends on how many different encodings where used to enter data
into the database).
You can find more details on the matter in the manual in chapter 21.

Best regards
Ivo Rossacher
>
> Obviously, this is a phppgadmin issue (and I have posted a question to
> them), but I am just curious what could have changed to cause it, and what
> if any workaround there would be outside of reverting to old version of
> phppgadmin or getting a patch.
>
> Thanks
> Bill Willits