When I created an index today, two varchar (200) + utf8 columns reported that the index was too long to exceed 1000 and failed. I checked the information because a uft8 occupies up to three bytes, the details are as follows:
UTF-8: Unicode Transformation Format-8bit that allows BOM inclusion, but typically does not. It is a multi-byte encoding for international characters. It uses 8 bits (one byte) for English and 24 bits (three bits) for Chinese characters. UTF-8 contains all the characters needed by all countries in the world, is an international code, universal. UTF-8-encoded text can be displayed on browsers that support utf8 character sets in countries. For example, if it is UTF-8 encoded, Chinese characters can also be displayed on Internet Explorer of foreigners. They do not need to download the Chinese language support package for Internet Explorer.
For more information about UTF-8 coding, see http://zh.wikipedia.org/zh/4108.
UTF-8 encoding is variable length encoding, according to the characters to be encoded to determine the specific length, there is a misunderstanding in the past, that UTF-8 Storage Data Length is fixed.
UTF-8: Unicode Transformation Format-8bit that allows BOM inclusion, but typically does not. It is a multi-byte encoding for international characters. It uses 8 bits (one byte) for English and 24 bits (three bits) for Chinese characters. UTF-8 contains all the characters needed by all countries in the world, is an international code, universal. UTF-8-encoded text can be displayed on browsers that support utf8 character sets in countries. For example, if it is UTF-8 encoded, Chinese characters can also be displayed on Internet Explorer of foreigners. They do not need to download the Chinese language support package for Internet Explorer.
For more information about UTF-8 coding, see http://zh.wikipedia.org/zh/4108.
UTF-8 encoding is variable length encoding, according to the characters to be encoded to determine the specific length, there is a misunderstanding in the past, that UTF-8 Storage Data Length is fixed.