Re: mysql lenght() and char_length not working for longer texts
Date: Tue, 07 Jul 2015 11:09:04 +0200
Message-ID: <3594764.8s91zndXLF_at_PointedEars.de>
> Thomas 'PointedEars' Lahn <PointedEars_at_web.de> wrote:
>> Lennart Jonsson wrote: >>> If you store unicode characters in a column you better use a character >>> set that supports it, like utf-8 >>> >>> create table t (x varchar(3) not null) >>> engine = innodb character set utf8; >> >> _UTF-8_ is _not_ a character set. It is a character _encoding_ for a >> character set.
>
> Smartass!
> MySQL itself uses the term "CHARACTER SET" in the parser and in the
> manual.
Yes, I know (which you would have known if you cared to read what you replied to). Therefore the correction.
> Your point is completely useless in the context "MySQL".
No, it is not.
> If you are not willing to help with THE PROBLEM but would rather BE
> RIGHT then I ask you to be silent.
Usenet is not a support forum.
> You are not helpful.
Your humble opinion. I suggest you go into a shower, river, or lake, cool down, and reconsider.
>>> Assuming this is true, there are characters that are represented with >>> more than two bytes so just doubling the space wont suffice, >> >> It will not. In UTF-8, a Unicode character can be encoded with up to 6 >> 8-bit bytes.
>
> Again: the context is MySQL. Here a column with CHARACTER SET utf8 can
> use at most 3 bytes per character because MySQL supports only
> characters from the BMP (Unicode U+0 ... U+FFFF) […]
<https://dev.mysql.com/doc/refman/5.7/en/charset-unicode.html>
> and those can all be encoded in utf8 sequences with at most 3 bytes.
_UTF-8_, yes.
<https://en.wikipedia.org/wiki/UTF-8>
-- PointedEars Twitter: _at_PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.Received on Tue Jul 07 2015 - 11:09:04 CEST