问题描述
框架中是否有任何内容可以帮助将字符串中带重音符号的b / b字符转换为标准字符串?
例如。 "Gráda" toGrada
Is there anything in the framework which will help translate accented
characters in strings to their standard counterparts?
eg. "Gráda" to "Grada"
推荐答案
有趣的是,我最近一直在寻找完全相同的东西,并且
无法找到任何原生的东西框架,所以我最终写了
我自己的映射函数。对于拉丁语言来说很容易(例如法语,
西班牙语,意大利语,葡萄牙语等),相当简单的德语(例如任何元音
与变音符号被未修改的替换元音+''e''),斯堪的纳维亚语言有点混乱
,希腊语和西里尔语更糟糕,而且带有变音符号的东欧语言几乎不可能获得
。
你需要做的商业目的是什么,AAMOI?
Interestingly enough, I was looking for exactly the same thing recently, and
was unable to find anything native to the Framework, so I ended up writing
my own mapping function. Easy enough for the Latin languages (e.g. French,
Spanish, Italian, Portuguese etc), fairly simply for German (e.g. any vowel
with an umlaut is replaced by the unmodified vowel + ''e''), a little messier
for the Scandinavian languages, even worse for Greek and Cyrillic, and
almost impossible for the Eastern European languages with diacritics.
What is the business purpose behind your need to do this, AAMOI?
有趣的是,我最近一直在寻找完全相同的东西,
并且无法找到框架中的任何原生内容,所以我最终法语,西班牙语,意大利语,葡萄牙语等),对于德语来说相当简单(例如
任何带有变音符号的元音都被未修改的元音+''e''取代)对于斯堪的纳维亚语言来说更糟糕,对于希腊语和西里尔语来说更糟糕,对于带有变音符号的东欧语言来说几乎是不可能的。
什么是你需要这样做的商业目的,AAMOI?
Interestingly enough, I was looking for exactly the same thing recently,
and was unable to find anything native to the Framework, so I ended up
writing my own mapping function. Easy enough for the Latin languages (e.g.
French, Spanish, Italian, Portuguese etc), fairly simply for German (e.g.
any vowel with an umlaut is replaced by the unmodified vowel + ''e''), a
little messier for the Scandinavian languages, even worse for Greek and
Cyrillic, and almost impossible for the Eastern European languages with
diacritics.
What is the business purpose behind your need to do this, AAMOI?
这篇关于翻译重音字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!