使用C#解析'Arabic Extended-A'Unicode [英] Parsing 'Arabic Extended-A' Unicode using C#

查看:91
本文介绍了使用C#解析'Arabic Extended-A'Unicode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在开发一个项目,我需要解析阿拉伯字符串,其中包含来自Arabic Extended-A'Unicode类别的字符,问题是代码不能替换任何字符要求它做这个类别的角色!!!!

Hello,
I am working on a project at which i need to parse Arabic strings that contains character from the Arabic Extended-A' Unicode category the problem is that the code doesn't replace any character from this category when ask it to do!!!!

string word ="قَدِيرٞ";
word=word.Replace("\u08F1","");// the string word wasnt affected by this !!!!!!



有人知道在这种情况下该怎么做??

感谢高级


do anybody have any idea what to do in this case??
thanks in advanced

推荐答案

我在十六进制编辑器中查看了您的代码点:您的文本不包含08F1。如果不包含任何08 **字符(包括Arabic Extended-A子集的范围)。你的代码点是(低字节到高字节):

I looked at your code points in hex editor: your text don't contain 08F1. If doesn't contain any 08** characters (the range which includes "Arabic Extended-A" subset) at all. Your code points are (low byte to high bytes):
0642, Arabic Letter Quaf, َ
064E, Arabic Fatha, ق
062F, Arabic Letter Dal, د
0650, Arabic Kasra, ِ
064A, Arabic Letter Yeh, ي
0631, Arabic Letter Ref, ر
065E, Arabic Fatha with two dots (I cannot show it)





难怪字符串保持不变,因为在您输入的字符串中找不到此字符(我无法100%确定您在代码中输入的内容完全相同)。你真的在寻找一些更罕见的代码点:阿拉伯语开放的dammatan(来自Koranic注释标志)。它是用Unicode标准化的,但是没有任何Windows字体可用(我找不到带有两个点的阿拉伯语Fatha),所以我可以想象你没有真正设法在这个网站上输入它,所以它不知何故得不到进入你的数据。



怎么办?好吧,试着说服微软和其他操作系统制造商扩展他们对阿拉伯字符集的支持(我不确定,也许阿拉伯语版本的Windows带有支持更多字符的额外字体。)或者你可以尝试获取你可以使用的字体有更完整的字符设置支持...



请参阅:

http://www.unicode.org/charts/PDF/U0600.pdf [ ^ ],

http://www.unicode.org/charts/PDF/U08A0.pdf [ ^ ]。



-SA

这篇关于使用C#解析'Arabic Extended-A'Unicode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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