Godsrock37 has asked for the wisdom of the Perl Monks concerning the following question:

I have a string with a superscript 2 in the following form: \xB2

The character set is supposed to be utf-8 for all the data i'm dealing with but i cant confirm that for this particular character. When I go to insert the string into a mysql database i get the following error:

Thread 15 terminated abnormally: DBD::mysql::st execute failed: Incorrect string value: '\xB2 [22-...' for column 'Attribute8Value' at row 1

I'm completely baffled. I did: use utf8; do i have to convert it? TIA

Replies are listed 'Best First'.
Re: Superscript 2 character set issue
by moritz (Cardinal) on Jul 29, 2008 at 17:47 UTC

      Thanks for the help there. That cleared up some things for me. removed use utf8; and encode('utf8', $string) took care of it

      thanks again!