Thread: PostgreSQL encoding

PostgreSQL encoding

From
Zouari Fourat
Date:
Hello,
am new to pgsql and i have some problem with encoding and charsets,
i can view my data over pgadmin3 without any problem (i have some
frensh data with accents 'é,à,ç,è') and on my php application the
accet characters doesnt work, how to resolve that

Re: PostgreSQL encoding

From
mauro.folcarelli@sistinf.it
Date:

I solved my problems with charsets in this way:

1. Before composing the HTML page send the header, in this way:

header("Content-type: text/html; charset=utf-8");

2. Put in HTML page the following:

<META HTTP-EQUIV="Content-Type" CONTENT="text/html"; charset="utf-8">

that's all.
 

Re: PostgreSQL encoding

From
Zouari Fourat
Date:
there's no 'standard' way to do that ?
and if i got arabic content or chinese one, i should change headers again ?


On Tue, 22 Feb 2005 13:43:14 +0100, mauro.folcarelli@sistinf.it
<mauro.folcarelli@sistinf.it> wrote:
>
> I solved my problems with charsets in this way:
>
> 1. Before composing the HTML page send the header, in this way:
>
> header("Content-type: text/html; charset=utf-8");
>
> 2. Put in HTML page the following:
>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html"; charset="utf-8">
>
> that's all.
>

Re: PostgreSQL encoding

From
Christopher Kings-Lynne
Date:
> there's no 'standard' way to do that ?

That is the standard way to do it...

> and if i got arabic content or chinese one, i should change headers again ?

Yes, because the encoding is different.  However, arabic usually uses
Unicode as well.

Chris