I'm running afoul of the UTF8 character set somehow:

mysql> select convert(char(0x96) using utf8);
+----------------------------------+
| convert(char(0x96) using utf8)   |
+----------------------------------+
| NULL                             |
+----------------------------------+
1 row in set, 1 warning (0.00 sec)

mysql> show warnings;
+-------+------+-------------------------------------+
| Level | Code | Message                             |
+-------+------+-------------------------------------+
| Error | 1300 | Invalid utf8 character string: '96' |
+-------+------+-------------------------------------+
1 row in set (0.00 sec)

On top of my other problems, I've discovered that pasting the UTF8 character
represented by 0x96 into the MySQL CLI (Windows) somehow converts the
character to 0x2D (a normal dash); so a lot of my testing has been wasted.
Pasting it into a Windows-based editor preserves the character as 0x96.


Regards,

Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com

>-----Original Message-----
>From: Jerry Schwartz [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, April 16, 2008 12:49 PM
>To: 'Mysql'
>Subject: \x96 in column value?
>
>Why is the character \x96 not allowed as a value in an INSERT query?
>I've SET
>NAMES utf8, the table collation is utf8_general_ci, the default
>character set
>for the table is utf8. I get this error message from my application:
>
>ERROR: INSERT INTO prod
>(prod_title,prod_published,prod_pub_prod_id,prod_content_info,prod_samp_
>doc,prod_toc_doc,prod_type,prod_ready,prod_discont,prod_info_type,prod_i
>d,prod_num,pub_id,prod_added,prod_updated,prod_export,prod_changed)
>VALUES ('Disposable Paper Products ? Uruguay','2007-12-
>01','DPP2007UY','Pages:
>44','\\\\xa20\\d\\publishers\\eo\\fullreports\\DPP07_UY.pdf','\\\\xa20\\
>d\\publishers\\eo\\content\\DPP07_UY-
>LOC.doc','S',1,0,'E','Y8F1kqasoQVE90F',65642,'BG3g33kv5CDkim7',NOW(),NOW
>(),1,1);
>Incorrect string value: '\x96 Urug...' for column 'prod_title' at row 1
>
>That bizarre character in the middle of 'Disposable Paper Products ?
>Uruguay'
>is, as you can see, \x96. MySQL certainly doesn't seem to like it. The
>data is
>being read from a file. Curiously, if I copy the line directly from the
>input
>file it looks like this:
>
>Disposable Paper Products - Uruguay
>
>You may not be able to see it, but that is actually an n-dash (\x96).
>
>Regards,
>
>Jerry Schwartz
>The Infoshop by Global Information Incorporated
>195 Farmington Ave.
>Farmington, CT 06032
>
>860.674.8796 / FAX: 860.674.8341
>
>www.the-infoshop.com
>www.giiexpress.com
>www.etudes-marche.com
>
>
>
>
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>infoshop.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to