Now there are two questions.
- How to realize the automatic detection of text language?
- Can it be achieved through the MySQL function?
If the second question`s answer is true, it will become one question, that is how to make it come true?
In fact, I'm curious about the Google Translate. It can automatically detect the language that is used, although it certainly did not use the MySQL to achieve. I hope to get a reply from MYSQL.
As far as I can see, each country has its own Unicode range, and MySQL has a lot of conversion functions, and for PHP function — mb_detect_encoding
— Detect character encoding, so I wonder if there is a similar approach to do it.
And for my MySQL records, they are saved with UTF-8 encoding (DEFAULT CHARSET=utf8). When using an SQL query it default through itself inside decoders like CONVERT(rs USING utf8)
, so can we try to use all of encodings like CONVERT(rs USING xxx)
in one loop, and which does not exceed the scope of expression, it will be the right encode.