如何修改子字符串? [英] How to amend sub strings?
问题描述
使用将ü
和ue
视为相同的归类xxx_german2_ci
,是否可以将所有出现的München
突出显示如下?
Using collation xxx_german2_ci
which treats ü
and ue
as identical, is it possible to have all occurences of München
be highlighted as follows?
-
示例输入:
"München can also be written as Muenchen."
示例输出:"<b>München</b> can also be written as <b>Muenchen</b>."
注意:还可以使用一些非SQL编程.唯一的要求是有关哪些字符序列相同的知识是从MySQL排序规则中获取的.
推荐答案
I have found this tables: http://developer.mimer.com/collations/charts/index.tml. They are, of course, landuage dependant. Collation is just comapring algorithm. For general utf8 I am not sure, how it treats special characters.
您可以使用它们找到所需的符号,并将它们替换为输出,以得到与示例相同的结果.但是对于这些,您将需要某种编程语言(PHP或其他任何语言).
You can use them to found desired symbols and replace them in output to get same result as in example. But for those, you will need some programming language (PHP or anything else).
其他资源:
http://collation-charts.org/
http://mysql.rjweb.org/doc.php/charcoll (在页面上
基本上,尝试使用Google排序规则算法mysql utf8_general_ci"或类似的方法
Basicly, try to google "collation algorithm mysql utf8_general_ci" or something like this
这篇关于如何修改子字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!