unicode and frensh accents
unicode and frensh accents
am 03.03.2005 15:22:00 von Zouari Fourat
Hello,
I have a problem displaying frensh data :
my client encoding is set to UNICODE (same as phpPgAdmin)
when selecting data with phpPgAdmin, there's no errors displaying
accents and other special frensh caracters.
but when selecting from my own script i dont get those frensh caracters.
in my html pages i do :
like phpPgAdmin and there is allways problems displaying frensh data...
anyone can help ?
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
Re: unicode and frensh accents
am 03.03.2005 15:28:04 von Christopher Kings-Lynne
> I have a problem displaying frensh data :
> my client encoding is set to UNICODE (same as phpPgAdmin)
> when selecting data with phpPgAdmin, there's no errors displaying
> accents and other special frensh caracters.
> but when selecting from my own script i dont get those frensh caracters.
> in my html pages i do :
>
> like phpPgAdmin and there is allways problems displaying frensh data...
> anyone can help ?
Well, you can try sending an http header as well, before ANY of your
script's output:
header('Content-Type: text/html; charset=UTF-8');
Alternatively, try setting the client encoding to unicode with an sql
statement before running any queries, however that should not be
necessary as client encoding defaults to server encoding.
BTW, have a look at the printHeader() method in classes/Misc.php in
phpPgAdmin to see how we do it.
Chris
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Re: unicode and frensh accents
am 03.03.2005 16:14:17 von Zouari Fourat
in phppgadmin, the statement
header('Content-Type: text/html; charset=UTF-8');
[root@apps pgadmin]# grep -r "header(" *
dataexport.php: header("Location: {$url}");
dataexport.php: header("Location: {$url}");
dataexport.php: header("Location: {$url}");
dataexport.php: header('Content-Type: text/plain');
dataexport.php: header('Content-Type:
application/download');
dataexport.php: header('Content-Disposition:
attachment; filename=dump.' . $ext);
dataexport.php: header('Content-Type: text/plain');
dbexport.php: header('Content-Type: text/plain');
dbexport.php: header('Content-Type:
text/plain');
dbexport.php: header('Content-Type:
application/download');
dbexport.php:
header('Content-Disposition: attachment; filename=dump.sql');
dbexport.php: header('Content-Type:
application/download');
dbexport.php: header('Content-Disposition:
attachment; filename=dump.sql.gz');
help.php: header("Location: $url");
logout.php:header('Location: index.php');
in classes/Misc.php
there's
echo "
charset={$lang['appcharset']}\" />\n";
wich result in
same as i did ...
there's another thing that can be helpfull tracking my problem.
when getting data well formed in my explorer from phppgadmin and then
saving it to my hard disk and displaying it from its local location i
get the same problems.
and the line :
exists !
On Thu, 03 Mar 2005 22:28:04 +0800, Christopher Kings-Lynne
wrote:
> > I have a problem displaying frensh data :
> > my client encoding is set to UNICODE (same as phpPgAdmin)
> > when selecting data with phpPgAdmin, there's no errors displaying
> > accents and other special frensh caracters.
> > but when selecting from my own script i dont get those frensh caracters.
> > in my html pages i do :
> >
> > like phpPgAdmin and there is allways problems displaying frensh data...
> > anyone can help ?
>
> Well, you can try sending an http header as well, before ANY of your
> script's output:
>
> header('Content-Type: text/html; charset=UTF-8');
>
> Alternatively, try setting the client encoding to unicode with an sql
> statement before running any queries, however that should not be
> necessary as client encoding defaults to server encoding.
>
> BTW, have a look at the printHeader() method in classes/Misc.php in
> phpPgAdmin to see how we do it.
>
> Chris
>
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Re: unicode and frensh accents
am 03.03.2005 16:24:27 von Christopher Kings-Lynne
> there's another thing that can be helpfull tracking my problem.
> when getting data well formed in my explorer from phppgadmin and then
> saving it to my hard disk and displaying it from its local location i
> get the same problems.
> and the line :
>
> exists !
Then I have no idea...
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Re: unicode and frensh accents
am 03.03.2005 16:51:50 von Zouari Fourat
ok i admit...
that last one is wrong, the page when saved displays well formed data...
but what about header('... charset=UTF-8 statement ? it doesnt occur
in phppgadmin files ...
On Thu, 03 Mar 2005 23:24:27 +0800, Christopher Kings-Lynne
wrote:
> > there's another thing that can be helpfull tracking my problem.
> > when getting data well formed in my explorer from phppgadmin and then
> > saving it to my hard disk and displaying it from its local location i
> > get the same problems.
> > and the line :
> >
> > exists !
>
> Then I have no idea...
>
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Re: unicode and frensh accents
am 05.03.2005 01:36:13 von Markus Bertheau
--=-TvUQJNagslu+QYxA4tkw
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
У ЧÑв, 2005-03-03 Ñ 16:51 +0100, Zouari Fourat =D0=
¿Ð¸ÑÐ=B5:
> ok i admit...
> that last one is wrong, the page when saved displays well formed data...
>=20
> but what about header('... charset=3DUTF-8 statement ? it doesnt occur
> in phppgadmin files ...
Right, we don't set it. Usually Apache does if not told otherwise.
What do you get from your own script? Best make a screenshot.
Markus
--=20
Markus Bertheau
--=-TvUQJNagslu+QYxA4tkw
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: =?koi8-u?Q?ãÀ?= =?koi8-u?Q?_ÞÁÓÔÉÎ=D5?=
=?koi8-u?Q?_ÐÏצÄÏÍÌÅÎ=CE?= =?koi8-u?Q?=D1?=
=?koi8-u?Q?_ЦÄÐÉÓÁÎ=CF?=
=?koi8-u?Q?_ÃÉÆÒÏ×ÉÍ?=
=?koi8-u?Q?_ЦÄÐÉÓÏÍ?=
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQBCKP792RUnMPztcykRApzYAJ0Z54csHVvYt3xoSvYfcgoaTTfxLwCf TU65
HbsvzG/xtL8omYz5D3oouPY=
=9tMd
-----END PGP SIGNATURE-----
--=-TvUQJNagslu+QYxA4tkw--
Re: unicode and frensh accents
am 05.03.2005 09:59:21 von miroslav.sulc
This is a multi-part message in MIME format.
--------------080405050805080703040906
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Maybe you could send us the code that retrieves the data from PostgreSQL.
I personally use 'pg_set_client_encoding($link, 'UNICODE');' before I=20
get data from server to be sure I get it in utf-8 encoding. Other thing=20
that might be a problem is that default Apache configuration file=20
contains 'AddDefaultCharset ISO-8859-1' instruction which sets default=20
charset in case the Apache cannot find one in the page. Disabling this=20
makes characters unmangled (it may and probably should by solved other=20
way but I didn't spend my time on figuring how).
Miroslav Å ulc
Markus Bertheau wrote:
>У ЧÑв, 2005-03-03 Ñ 16:51 +0100, Zouari Fourat =
пиÑе:
> =20
>
>>ok i admit...
>>that last one is wrong, the page when saved displays well formed data..=
..
>>
>>but what about header('... charset=3DUTF-8 statement ? it doesnt occur
>>in phppgadmin files ...
>> =20
>>
>
>Right, we don't set it. Usually Apache does if not told otherwise.
>
>What do you get from your own script? Best make a screenshot.
>
>Markus
>
> =20
>
--------------080405050805080703040906
Content-Type: text/x-vcard; charset=utf-8;
name="miroslav.sulc.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="miroslav.sulc.vcf"
YmVnaW46dmNhcmQNCmZuO3F1b3RlZC1wcmludGFibGU6TWlyb3NsYXYgPUM1
PUEwdWxjDQpuO3F1b3RlZC1wcmludGFibGU6PUM1PUEwdWxjO01pcm9zbGF2
DQpvcmc6U3RhcnROZXQgcy5yLm8uDQphZHI7cXVvdGVkLXByaW50YWJsZTtx
dW90ZWQtcHJpbnRhYmxlOjs7VnJjaGxpY2s9QzM9QTlobyAxNjEvNTtQcmFo
YSA1OzsxNTAgMDA7PUM0PThDZXNrPUMzPUExIHJlcHVibGlrYQ0KZW1haWw7
aW50ZXJuZXQ6bWlyb3NsYXYuc3VsY0BzdGFydG5ldC5jeg0KdGl0bGU6Q0VP
DQp0ZWw7d29yazorNDIwIDI1NyAyMjUgNjAyDQp0ZWw7Y2VsbDorNDIwIDYw
MyA3MTEgNDEzDQp4LW1vemlsbGEtaHRtbDpUUlVFDQp1cmw6aHR0cDovL3d3
dy5zdGFydG5ldC5jeg0KdmVyc2lvbjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------080405050805080703040906
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if you=
r
joining column's datatypes do not match
--------------080405050805080703040906--