PostgreSQL encoding

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 '=E9,=E0,=E7,=E8') and on my php application the
accet characters doesnt work, how to resolve that

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq
Zouari Fourat [ Di, 22 Februar 2005 13:27 ] [ ID #657915 ]

Re: PostgreSQL encoding

This is a multipart message in MIME format.
--=_alternative 0045E028C1256FB0_=
Content-Type: text/plain; charset="US-ASCII"

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.

--=_alternative 0045E028C1256FB0_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">I solved my problems with charsets in
this way:</font>
<br>
<br><font size=2 face="sans-serif">1. Before composing the HTML page send
the header, in this way:</font>
<br>
<br><font size=2 face="sans-serif">header("Content-type: text/html;
charset=utf-8");</font>
<br>
<br><font size=2 face="sans-serif">2. Put in HTML page the following:</font>
<br>
<br><font size=2 face="sans-serif"><META HTTP-EQUIV="Content-Type"
CONTENT="text/html"; charset="utf-8"></font>
<br>
<br><font size=2 face="sans-serif">that's all.</font>
<br><font size=2 face="sans-serif"> </font>
--=_alternative 0045E028C1256FB0_=--
mauro.folcarelli [ Di, 22 Februar 2005 13:43 ] [ ID #657916 ]

Re: PostgreSQL encoding

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 [at] sistinf.it
<mauro.folcarelli [at] 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.
>

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Zouari Fourat [ Di, 22 Februar 2005 14:27 ] [ ID #657917 ]

Re: PostgreSQL encoding

> 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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo [at] postgresql.org)
Christopher Kings-Lyn [ Di, 22 Februar 2005 14:32 ] [ ID #657918 ]
Datenbanken » gmane.comp.db.postgresql.php » PostgreSQL encoding

Vorheriges Thema: Fwd: From MySQL to PostgreSQL
Nächstes Thema: From MySQL to PostgreSQL