可以将特定于语言的字符转换为UTF8中的拉丁字符 [英] Is it possible to convert language specific characters to latin characters in UTF8

查看:524
本文介绍了可以将特定于语言的字符转换为UTF8中的拉丁字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有任何关系或现有算法允许在UTF8代码页中将国家字符转换为等效的拉丁字符。

I am wondering if there are any relationships or existing algorithms allowing converting from national characters to equivalent Latin characters within the UTF8 codepage?

例如(在波兰语中):

For example (in Polish):

Ą - > A

Ó - > O

ż - > z

ź - > z
...

ź -> z ...

:'zażółćgęśląjażń'

phrase like: 'zażółć gęślą jażń'

转换为:'zazolc gesla jazn'

converts to: 'zazolc gesla jazn'

目前我正在使用转换array for Polish,但是我正在寻找一个处理所有基于拉丁语的语言的通用解决方案。

Currently I am using a conversion array for Polish, but I am looking for a universal solution handling all Latin based languages.

感谢

推荐答案

分解+ C#导致我到这个CodeProject文章(codeproject.com/KB/cs/UnicodeNormalization.aspx?display=Print),它提供了一个即用的解决方案。命名您所寻找的内容的能力不能低估;)感谢所有答案。

To make the answer complete, the 'Unicode decomposition + C#' led me to this CodeProject article (codeproject.com/KB/cs/UnicodeNormalization.aspx?display=Print) which offers a ready to use solution. The ability to name what you are looking for can't be underestimated ;) Thanks for all answers.

这篇关于可以将特定于语言的字符转换为UTF8中的拉丁字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆