On Mon, 2008-11-17 at 01:54 +0200, Bülent ŞENER wrote:
>
> Yeni bir fedora 9 kurup üzerinde postgresql 8.3.4 ile denedim (tüm
> güncellemeler yüklü). Aynı hata devam ediyor.
Öncelikle bir SQL tümce seti gönderebilir misiniz bana?
Sizin sorununuzun daha çok client_encoding ile ilgili olabileceğini
düşünüyorum:
================
$ cat /etc/system-release
Fedora release 9 (Sulphur)
$ psql test -U postgres
psql (8.4devel)
Type "help" for help.
[postgres@[local]:test]=# show client_encoding ;
client_encoding
-----------------
UTF8
(1 row)
[postgres@[local]:test]=# CREATE TEMP TABLE t1 (c1 varchar(15));
CREATE TABLE
[postgres@[local]:test]=# INSERT INTO t1 VALUES ('Şanlıurfa');
INSERT 0 1
[postgres@[local]:test]=# SELECT * from t1;
c1
-----------
Şanlıurfa
(1 row)
================
Şimdi de terminalimin dil kodlamasını ISO-8859-9 yapayım ve sonuca
bakın:
====================
[postgres@[local]:test]=# CREATE TEMP TABLE t1 (c1 varchar(15));
CREATE TABLE
[postgres@[local]:test]=# INSERT INTO t1 VALUES ('Şanlıurfa');
ERROR: invalid byte sequence for encoding "UTF8": 0xde61
HINT: This error can also happen if the byte sequence does not match
the encoding expected by the server, which is controlled by
"client_encoding".
-- Veritabanı UTF-8 olduğu için burada hata verdi PostgreSQL. Ben de
client_encoding'i LATIN5 yaptım, ve:
[postgres@[local]:test]=# set client_encoding TO LATIN5;
SET
[postgres@[local]:test]=# INSERT INTO t1 VALUES ('Şanlıurfa');
INSERT 0 1
[postgres@[local]:test]=# SELECT * from t1;
c1
-----------
(1 row)
=============================================================
phpPgAdmin'den veriyi girerken Apache'de AddDefaultCharset LATIN-5 gibi
birşeyse UTF-8 veritabanında sorun çıkar bu şekilde. Yeni kurduğunuz
Apache'de öntanımlı olarak herşey UTF-8 gittiği için sorun
yaşamadığınızı tahmin ediyorum.
Kolay gelsin,
-- Devrim GÃœNDÃœZ, RHCE devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org
_______________________________________________
Linux-programlama mailing list
Linux-programlama_at_liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama