pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedunicode and frensh accents
7+ messages / 4 participants
[nested] [flat]
* unicode and frensh accents
@ 2005-03-03 14:22 Zouari Fourat <fourat@gmail.com>
2005-03-03 14:28 ` Re: unicode and frensh accents Christopher Kings-Lynne <chriskl@familyhealth.com.au>
0 siblings, 1 reply; 7+ messages in thread
From: Zouari Fourat @ 2005-03-03 14:22 UTC (permalink / raw)
To: pgsql-php
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 :
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
like phpPgAdmin and there is allways problems displaying frensh data...
anyone can help ?
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: unicode and frensh accents
2005-03-03 14:22 unicode and frensh accents Zouari Fourat <fourat@gmail.com>
@ 2005-03-03 14:28 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-03-03 15:14 ` Re: unicode and frensh accents Zouari Fourat <fourat@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Christopher Kings-Lynne @ 2005-03-03 14:28 UTC (permalink / raw)
To: Zouari Fourat <fourat@gmail.com>; +Cc: pgsql-php
> 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 :
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> 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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: unicode and frensh accents
2005-03-03 14:22 unicode and frensh accents Zouari Fourat <fourat@gmail.com>
2005-03-03 14:28 ` Re: unicode and frensh accents Christopher Kings-Lynne <chriskl@familyhealth.com.au>
@ 2005-03-03 15:14 ` Zouari Fourat <fourat@gmail.com>
2005-03-03 15:24 ` Re: unicode and frensh accents Christopher Kings-Lynne <chriskl@familyhealth.com.au>
0 siblings, 1 reply; 7+ messages in thread
From: Zouari Fourat @ 2005-03-03 15:14 UTC (permalink / raw)
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: pgsql-php
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 "<meta http-equiv=\"Content-Type\" content=\"text/html;
charset={$lang['appcharset']}\" />\n";
wich result in <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
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 :
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
exists !
On Thu, 03 Mar 2005 22:28:04 +0800, Christopher Kings-Lynne
<chriskl@familyhealth.com.au> 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 :
> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> > 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
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: unicode and frensh accents
2005-03-03 14:22 unicode and frensh accents Zouari Fourat <fourat@gmail.com>
2005-03-03 14:28 ` Re: unicode and frensh accents Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-03-03 15:14 ` Re: unicode and frensh accents Zouari Fourat <fourat@gmail.com>
@ 2005-03-03 15:24 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-03-03 15:51 ` Re: unicode and frensh accents Zouari Fourat <fourat@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Christopher Kings-Lynne @ 2005-03-03 15:24 UTC (permalink / raw)
To: Zouari Fourat <fourat@gmail.com>; +Cc: pgsql-php
> 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 :
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> exists !
Then I have no idea...
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: unicode and frensh accents
2005-03-03 14:22 unicode and frensh accents Zouari Fourat <fourat@gmail.com>
2005-03-03 14:28 ` Re: unicode and frensh accents Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-03-03 15:14 ` Re: unicode and frensh accents Zouari Fourat <fourat@gmail.com>
2005-03-03 15:24 ` Re: unicode and frensh accents Christopher Kings-Lynne <chriskl@familyhealth.com.au>
@ 2005-03-03 15:51 ` Zouari Fourat <fourat@gmail.com>
2005-03-05 00:36 ` Re: unicode and frensh accents Markus Bertheau <twanger@bluetwanger.de>
0 siblings, 1 reply; 7+ messages in thread
From: Zouari Fourat @ 2005-03-03 15:51 UTC (permalink / raw)
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: pgsql-php
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
<chriskl@familyhealth.com.au> 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 :
> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> > exists !
>
> Then I have no idea...
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: unicode and frensh accents
2005-03-03 14:22 unicode and frensh accents Zouari Fourat <fourat@gmail.com>
2005-03-03 14:28 ` Re: unicode and frensh accents Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-03-03 15:14 ` Re: unicode and frensh accents Zouari Fourat <fourat@gmail.com>
2005-03-03 15:24 ` Re: unicode and frensh accents Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-03-03 15:51 ` Re: unicode and frensh accents Zouari Fourat <fourat@gmail.com>
@ 2005-03-05 00:36 ` Markus Bertheau <twanger@bluetwanger.de>
2005-03-05 08:59 ` Re: unicode and frensh accents Miroslav Šulc <miroslav.sulc@startnet.cz>
0 siblings, 1 reply; 7+ messages in thread
From: Markus Bertheau @ 2005-03-05 00:36 UTC (permalink / raw)
To: Zouari Fourat <fourat@gmail.com>; +Cc: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; pgsql-php
У Чтв, 2005-03-03 у 16:51 +0100, 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 ...
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
--
Markus Bertheau <twanger@bluetwanger.de>
Attachments:
signature.asc (application/pgp-signature, 188B) download
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: unicode and frensh accents
2005-03-03 14:22 unicode and frensh accents Zouari Fourat <fourat@gmail.com>
2005-03-03 14:28 ` Re: unicode and frensh accents Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-03-03 15:14 ` Re: unicode and frensh accents Zouari Fourat <fourat@gmail.com>
2005-03-03 15:24 ` Re: unicode and frensh accents Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-03-03 15:51 ` Re: unicode and frensh accents Zouari Fourat <fourat@gmail.com>
2005-03-05 00:36 ` Re: unicode and frensh accents Markus Bertheau <twanger@bluetwanger.de>
@ 2005-03-05 08:59 ` Miroslav Šulc <miroslav.sulc@startnet.cz>
0 siblings, 0 replies; 7+ messages in thread
From: Miroslav Šulc @ 2005-03-05 08:59 UTC (permalink / raw)
To: Markus Bertheau <twanger@bluetwanger.de>; +Cc: Zouari Fourat <fourat@gmail.com>; Christopher Kings-Lynne <chriskl@familyhealth.com.au>; pgsql-php
Maybe you could send us the code that retrieves the data from PostgreSQL.
I personally use 'pg_set_client_encoding($link, 'UNICODE');' before I
get data from server to be sure I get it in utf-8 encoding. Other thing
that might be a problem is that default Apache configuration file
contains 'AddDefaultCharset ISO-8859-1' instruction which sets default
charset in case the Apache cannot find one in the page. Disabling this
makes characters unmangled (it may and probably should by solved other
way but I didn't spend my time on figuring how).
Miroslav Šulc
Markus Bertheau wrote:
>У Чтв, 2005-03-03 у 16:51 +0100, 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 ...
>>
>>
>
>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
>
>
>
Attachments:
miroslav.sulc.vcf (text/x-vcard, 401B) download
begin:vcard
fn;quoted-printable:Miroslav =C5=A0ulc
n;quoted-printable:=C5=A0ulc;Miroslav
org:StartNet s.r.o.
adr;quoted-printable;quoted-printable:;;Vrchlick=C3=A9ho 161/5;Praha 5;;150 00;=C4=8Cesk=C3=A1 republika
email;internet:miroslav.sulc@startnet.cz
title:CEO
tel;work:+420 257 225 602
tel;cell:+420 603 711 413
x-mozilla-html:TRUE
url:http://www.startnet.cz
version:2.1
end:vcard
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2005-03-05 08:59 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-03 14:22 unicode and frensh accents Zouari Fourat <fourat@gmail.com>
2005-03-03 14:28 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-03-03 15:14 ` Zouari Fourat <fourat@gmail.com>
2005-03-03 15:24 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2005-03-03 15:51 ` Zouari Fourat <fourat@gmail.com>
2005-03-05 00:36 ` Markus Bertheau <twanger@bluetwanger.de>
2005-03-05 08:59 ` Miroslav Šulc <miroslav.sulc@startnet.cz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox