PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old May 8th, 2008, 06:40 PM
inzania inzania is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 1 inzania User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 28 sec
Reputation Power: 0
Chinese characters treated as string-escape commands

This is most unusual, and has stumped me for a long time now. I have been working with Chinese characters using PHP/MySQL for some time now. However, for whatever reason, this time I cannot seem to properly input the Chinese data. I have tried echo()ing the MySQL query in PHP and executing the query in a MySQL administration tool by copy and pasting, and it works fine. However, I have also tried hard-coding the Chinese in the php query statement (rather than passing them with a php variable) and that ALSO works fine. This leads me to suspect that somehow the PHP variable is encoded differently than how the MySQL DB wants the variable, which is leading the output to look fine, but the query to fail internally. That's my best guess.

Further checking reveals that the variable containing Chinese (which, again, can be printed to the screen fine) is being treated as an escape sequence of some sort my MySQL. That is to say, if I append some English to the front and back of the Chinese statement and run an update query with THAT variable, the result in the database is ONLY the "front" English - no Chinese or "back" english.

Unfortunately, I have no freaking clue how to fix this. Can anyone help?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Chinese characters treated as string-escape commands


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway