pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PostgreSQL encoding and PHP
2+ messages / 2 participants
[nested] [flat]

* PostgreSQL encoding and PHP
@ 2001-10-26 14:35  Alexandr Listopad <laa@laa.zp.ua>
  0 siblings, 1 reply; 2+ messages in thread

From: Alexandr Listopad @ 2001-10-26 14:35 UTC (permalink / raw)
  To: pgsql-php

Hi!

I have the database with win1251 encoding. My web site use koi8
encoding. I use PHP 4.0.8-dev + Apache 1.3.20.

How can I change encoding in database replays from win to koi in 
PHP best way?

p.s. sorry for my bad english.

-- 
 Laa



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: PostgreSQL encoding and PHP
@ 2001-10-26 16:15  Papp Gyozo <pgerzson@freestart.hu>
  parent: Alexandr Listopad <laa@laa.zp.ua>
  0 siblings, 0 replies; 2+ messages in thread

From: Papp Gyozo @ 2001-10-26 16:15 UTC (permalink / raw)
  To: Alexandr Listopad <laa@laa.zp.ua>; pgsql-php

I don't know the exact asnwer (perhaps I've not clearly understood what you
want), but:

there is several PHP extensions to deal with converting files between
various coded character sets and surface encodings :
 1. iconv http://www.php.net/manual/en/ref.iconv.php
 2. recode http://www.php.net/manual/en/ref.recode.php
 3. multibyte http://www.php.net/manual/en/ref.mbstring.php

you can also set your client encoding in PHP with pg_set_client_encoding()
http://www.php.net/manual/en/function.pg-set-client-encoding.php

and maybe you can pass some encoding information in the options argument
during connection. I'm not sure about this one.

hope this helps,

Papp Gyozo
- pgerzson@freestart.hu

> Hi!
>
> I have the database with win1251 encoding. My web site use koi8
> encoding. I use PHP 4.0.8-dev + Apache 1.3.20.
>
> How can I change encoding in database replays from win to koi in
> PHP best way?
>
> p.s. sorry for my bad english.
>
> --
>  Laa
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-10-26 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-10-26 14:35 PostgreSQL encoding and PHP Alexandr Listopad <laa@laa.zp.ua>
2001-10-26 16:15 ` Papp Gyozo <pgerzson@freestart.hu>

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