[PHP-DB] Unicode error with PostgreSQL

2006-09-26 Thread Tony Grimes
I'm getting the following error when PHP tries to insert a Unicode character
(the problem word is resume with the accents) into a PostgreSQL database:

pg_exec(): Query failed: ERROR:  Invalid UNICODE character sequence found
(0xe97375)

I can't figure out why I'm getting the error. The HTML form is utf-8 and the
database is UNICODE, but I'm still getting the error. Is there some problem
with the PHP library? Is there a PHP setting that controls character
encoding within scripts? Any help would be appreciated.

Thanks in advance,
Tony


Re: [PHP-DB] Unicode error with PostgreSQL

2006-09-26 Thread Tony Grimes
So does that mean I will always get that error? There's got to be a way
around that. Is there at least a way to detect invalid characters before I
try to insert?

Tony


On 9/26/06 1:17 PM, Niel Archer [EMAIL PROTECTED] wrote:

 PHP isn't multibyte aware by default.
 
 Niel
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Unicode error with PostgreSQL

2006-09-26 Thread Niel Archer
Hi Tony
You can use the multibyte aware string functions for processing.  There
is also a way to make it use UTF-8 encoding, but I forget how just now. 
I had the same problem with a MySQL db a while back.

Niel

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Unicode error with PostgreSQL

2006-09-26 Thread Tony Grimes
So does that mean I will always get that error? There's got to be a way
around that. Is there at least a way to detect invalid characters before I
try to insert?

Tony


On 9/26/06 1:17 PM, Niel Archer [EMAIL PROTECTED] wrote:

 PHP isn't multibyte aware by default.
 
 Niel
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Unicode

2006-04-30 Thread Liber
 

Make a query SET NAMES 'UTF8'  first.

-Original Message-
From: Gerry D [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 30, 2006 9:23 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Unicode

I am looking at building a lily register db. Lately there have been lots of
introductions from Latvia for example. I can set the tables to
utf8 and the htnk headers to charset=utf-8, but I still get ?s in both
Firefix and IE.

Any suggestions that I can try?

TIA

Gerry

--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Unicode

2006-04-29 Thread Gerry D

I am looking at building a lily register db. Lately there have been
lots of introductions from Latvia for example. I can set the tables to
utf8 and the htnk headers to charset=utf-8, but I still get ?s in
both Firefix and IE.

Any suggestions that I can try?

TIA

Gerry

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] unicode in php{PLS HELP URGENT}

2002-09-23 Thread roslyn jose


hello,

ive saved a  text file-note.txt with unicode encoding, and would like to print the 
file, how could i do so?? ive written the following piece of code, pls tell me where 
ive gone wrong.

?php
$filename=note.txt;
$fp = fopen ($filename,r);
$str=utf8_encode(file($filename));
echo $str[0];
?



-
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!


[PHP-DB] unicode in php

2002-09-23 Thread roslyn jose


hi,

thanks for the code, but i had tried it but got a fatal error: call to undefined 
function utf8_encode(). i saved my text file as unicode encoding..going thro the 
php.net site though...pls help if any ideas. thanks alot for the help. also am i 
sposed to encode or decode, as the text file is alreday saved as unicode encoding in 
notepadi was pondering over hat for a while. pls help.

roslyn



-
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!


Re: [PHP-DB] unicode in php{PLS HELP URGENT}

2002-09-23 Thread roslyn jose


hi,
ive been going thro the site aand also tried out the code, but im getting fatal error: 
call to undefined function utf8_encode(). pls help
roslyn
 Dave Smith wrote:$filename=note.txt;
//$fp = fopen ($filename,r);
$str=utf8_encode(file($filename));
foreach( $str as $line )
echo $line;
?



I got all of this code right from www.php.net. You should spend some 
time there. It is the best doc site I've ever seen for any programming 
language.

--Dave

roslyn jose wrote:

hello,

ive saved a text file-note.txt with unicode encoding, and would like to print the 
file, how could i do so?? ive written the following piece of code, pls tell me where 
ive gone wrong.

$filename=note.txt;
$fp = fopen ($filename,r);
$str=utf8_encode(file($filename));
echo $str[0];
?



-
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
 





-
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!