FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Cannot write utf8 data into a utf8 column
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Cannot write utf8 data into a utf8 column [message #170747 is a reply to message #170746] Fri, 19 November 2010 03:25 Go to previous messageGo to previous message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma:
Senior Member
["Followup-To:" header set to comp.databases.mysql.]
On Thu, 18 Nov 2010 16:54:47 -0000, Tony Marston wrote:
> This is very strange. When I try this update in my PHP program:
>
> UPDATE email_msg
> SET size=771,
> message_text='? ?:\n\n ????2010?11?25-26? ? ? ? 12?09-10? ? ? ?12?16-17?
> ?? ????:\n\n?
> ????2010???????2011????????????????????????? ????!\n\n?????????????????????????????????????????--?
> ? ?? ??!\n\n\n????????????:baoming_gz(at)126(dot)com??! ( ?????????!)??!
> \n\n\n\n?-?-?-?:0-2-0--3-9-9-2-6-2-7-5?(0)1-3-7-1-9-0-2-5-4-7-6
> ??? ????\n\n?-?-?-?:baoming_gz(at)126(dot)com\n\n\n????????,?????"??"?"delete"?:tuidin01(at)163(dot)com
> ??!',
> revised_date='2010-11-18 15:48:09',
> revised_user='AJM'
> WHERE email_id='159'
>
> it fails with the following error:
>
> "Incorrect string value: '\xA0\xA0 \xE6\x88\x91...' for column
> 'message_text' at row 1"
>
> When I try the SAME update through SQL-Front or phpMyAdmin it works! Why is
> this?

If it were the SAME, it would work the same. MySQL gives this error when
there's invalid UTF-8 byte sequences, like a continuation byte without
starting byte, or a starting byte that is not followed by a continuation
byte... Find out what the hex for what you're trying to stick in
message_text and I bet it won't be what it should be.

--
69. All midwives will be banned from the realm. All babies will be
delivered at state-approved hospitals. Orphans will be placed in
foster-homes, not abandoned in the woods to be raised by creatures
of the wild. --Peter Anspach's Evil Overlord list
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: store backslash in mysql database
Next Topic: Firewall - NetDefender :
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 09:20:12 GMT 2024

Total time taken to generate the page: 0.03515 seconds