Re: unicode and frensh accents - Mailing list pgsql-php

From Christopher Kings-Lynne
Subject Re: unicode and frensh accents
Date
Msg-id 42271EF4.8090109@familyhealth.com.au
Whole thread Raw
In response to unicode and frensh accents  (Zouari Fourat <fourat@gmail.com>)
Responses Re: unicode and frensh accents
List 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

pgsql-php by date:

Previous
From: Zouari Fourat
Date:
Subject: unicode and frensh accents
Next
From: Zouari Fourat
Date:
Subject: Re: unicode and frensh accents