News for hackers. Stuff that matters.
Re:Be Careful with UUID or GUID as Primary Keys by nvivo on Friday June 09, 2017 @06:20PM (#14525040)
That's not a real issue. I can understand this may bite some people that don't read the docs or don't understand encoding, but it's more misinformation than a technical problem.

UTF-8 is variable length anywhere, not just inside mysql. If you don't want this behavior, you can either use UCS-2 or UTF-32. UTF-16 and UTF-8 are variable length encodings, period.

Most databases that have use char length for unicode actually work with UCS-2, and use 2 bytes per char, like MS SQL Server.

Re:Be Careful with UUID or GUID as Primary Keys by nvivo on Saturday June 10, 2017 @10:09AM (#14527374)
Not sure what deserved a downvote here... Is there anything incorrect?
Re:Be Careful with UUID or GUID as Primary Keys by pornel on Saturday June 10, 2017 @02:00PM (#14528360)
It's not incorrect, but a strawman (I didn't downvote you btw).

The question was why UTF-8 in MySQL has weird limits. It wasn't about what MySQL should have done in an alternative universe.

Re:Be Careful with UUID or GUID as Primary Keys by nvivo on Saturday June 10, 2017 @07:22PM (#14529775)
Yeah, but I didn't point out what mysql should have done in an alternative universe. Mysql DOES support fixed lenght unicode, just use the correct encoding: ucs2 or utf32. What it does with utf-8 is what any system that supports utf-8 must do.