List:General Discussion« Previous MessageNext Message »
From:hsv Date:January 6 2014 2:32pm
Subject:Re: loading 0x00A0 into mysql
View as plain text  
>>>> 2014/01/06 12:18 +0000, Dave Howorth >>>>
Everything appears to work except that text fields containing a Unicode
non-breaking space (0x00A0) are truncated just before that character. I
can see the field in the dump file and it looks OK, but it doesn't all
make it into the new database. 
<<<<<<<<
Well, there are too many aspects to this, but the first is the character set that "mysql"
expects for input. If, say, it is USASCII (note that between the character set that
"mysql" takes for input and the character set in the table no association is needful),
the "nbsp" is out of range. (It is, of course, not nice if "mysqldump" yields an output
that "mysql" cannot read.) Try entering it with some escape-sequence (this one is based
on the original SQL with features from PL1, not from C, which MySQL supports if 'ANSI' is
in "sql_mode"):

'some text ... ' || X'A0' || ' ... more text ...'

or (slightly less PL1)

CONCAT('some text ... ', X'A0', ' ... more text ...')

Thread
loading 0x00A0 into mysqlDave Howorth6 Jan 2014
  • Re: loading 0x00A0 into mysqlhsv6 Jan 2014
Re: loading 0x00A0 into mysqlDave Howorth6 Jan 2014
  • Re: loading 0x00A0 into mysqlDobromir Velev7 Jan 2014