Storing Special Characters

Поиск
Список
Период
Сортировка
От Rebecca Clarke
Тема Storing Special Characters
Дата
Msg-id CAMChtdc1dy00Mig8VoMC6DCmxb=ka9n-YDW6spkccH7qFoFtRg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Storing Special Characters  (Leif Biberg Kristensen <leif@solumslekt.org>)
Список pgsql-general
Hi there.

This may be the wrong forum to inquire in, but I'd be grateful if I could directed in the right direction if that is the case.

I am currently using Postgresql 9.1. 

I have a table in which I want to store shop names. Some of the shop names contain 'é' and '£'.

The query below works when I run it through pg_admin:

insert into retail(storename) values ('£'::character varying)

However, when I run the same query through pg_query in PHP, I get:

PHP Warning:  pg_query(): Query failed: ERROR:  invalid byte sequence for encoding "UTF8": 0xa3


I'd really like to find a solution to getting this code to work through PHP. My PHP code is correct as it executes other queries (which have no special characters) without complaint. Do I need to make any alterations in Postgresql? Is my sql wrong? What is the difference in how its executed though  PgAdmin and PHP?

I've been relentlessly searching google for a solution to no avail.

Many thanks in advance.

R Clarke



В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Running out of memory on vacuum
Следующее
От: Leif Biberg Kristensen
Дата:
Сообщение: Re: Storing Special Characters