If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Polish Characters & mysql_query()

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-22-11, 03:00
veggiop veggiop is offline
Registered User
 
Join Date: Mar 2011
Posts: 10
Polish Characters & mysql_query()

Hi,
I am using MySQL 5.5.13 / PHP 5.3.6 / phpMyAdmin 3.4.2 / on Windows 2003 Server Standard.
I have a strange issue here. It is to do with the Polish character - ó - (and probably others as well).
When I enter the above character directly into MySQL using phpMyAdmin it goes in fine.
When I use the php function mysql_Query(), I get the following error, "Incorrect string value: '\xF3 ...".
I have tried using "mysql_query("SET NAMES 'utf8'")" and "mysql_query("SET CHARACTER SET 'utf8'")", but still it fails. I have tried changing the field collation in MySQL from UTF-8 to standard Latin and back. I have even tried using iconv() function but that give an illegal character error.
The strange thing is that I have a similar setup on another server using MySQL 5.1.33 / PHP 5.2.9, and it works fine for all characters.
Can any one advise please.
Reply With Quote
  #2 (permalink)  
Old 06-22-11, 05:11
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
Have you tried printing out the INSERT statement within your PHP code? It looks like there are more characters being included during the INSERT statement.
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #3 (permalink)  
Old 06-22-11, 07:40
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
wasn't there a question about this not so long ago
can't rememebr if the resolution was a PHP problem, a MySQL problem (with Version 5) or there was no resolution
have a look in either / or the PHP 7 MySQL forums for UTF8 or character encoding problems
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On