K4kArot2015 / sigplus

Automatically exported from code.google.com/p/sigplus
0 stars 0 forks source link

Illegal mix of collations #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This issue tracker is for sigplus 1.8.5
J.3.1

Error
Illegal mix of collations (ascii_general_ci,IMPLICIT) and 
(utf8_general_ci,COERCIBLE) for operation '=' SQL=SELECT `filetime` FROM 
`fw_sigplus_image` WHERE `fileurl` = 
'/images/_stock/babys-die-früchte-essen-31179121.jpg'

---------------

Best Regards!

Original issue reported on code.google.com by ten.mari...@gmail.com on 22 Jun 2013 at 7:02

GoogleCodeExporter commented 9 years ago
What operating system do you use for this site? Normally, special characters 
like accented characters should not appear in file names or URLs, these should 
be URL-encoded. Operating systems store special characters in the file system 
in various ways, the operating system brand should help locate where the issue 
originates from.

Original comment by huny...@gmail.com on 22 Jun 2013 at 10:41

GoogleCodeExporter commented 9 years ago
os x 10.7, 10.8

Original comment by ten.mari...@gmail.com on 22 Jun 2013 at 10:46

GoogleCodeExporter commented 9 years ago
As of version 1.5.0.188, sigplus assumes image URLs (including absolute file 
paths) consist of ASCII characters only. This is mainly due to a limitation in 
the MySQL database engine sigplus uses internally for image data storage. 
sigplus adds a unique index on the database table column

fileurl VARCHAR(767) CHARACTER SET ascii NOT NULL

There is a limit, however, on the maximum number of bytes an indexed column may 
comprise of, which is 767. With the ASCII character set, bytes correspond to 
characters. This is, unfortunately, not true of UTF-8, where up to three bytes 
can correspond to a single UTF-8 character (in the MySQL implementation). This 
would reduce the maximum supported image URL length to 255 characters, which 
might prove too short in certain cases (e.g. Picasa). For this reason, image 
URLs are expected to be encoded in ASCII. The image file name 
"babys-die-früchte-essen" clearly violates this rule, due to the umlaut 
character "ü".

Original comment by huny...@gmail.com on 14 Sep 2013 at 6:27

GoogleCodeExporter commented 9 years ago
Fixed in sigplus version 1.5.0.189.

Replaced MySQL character encoding "ascii" with "binary".

Original comment by huny...@gmail.com on 14 Sep 2013 at 7:14