如何生成的UTF-8字符集在.net中的所有字符 [英] How to Generate all the characters in the UTF-8 charset in .net

查看:180
本文介绍了如何生成的UTF-8字符集在.net中的所有字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在考虑产生的所有字符的UTF-8字符集来测试系统是如何处理他们每个人的任务。我没有与字符编码太多的经验。在快到我要去尝试是增加的计数器,然后尝试将其转化十进制数到它相当于UTF-8字符,但到目前为止,我还没有能够找到一种有效的方式来在C#3.5

I have been given the task of generating all the characters in the UTF-8 character set to test how a system handles each of them. I do not have much experience with character encoding. The approaching I was going to try was to increment a counter, and then try to translate that base ten number into it's equivalent UTF-8 character, but so far I have no been able to find an effective way to to this in C# 3.5

任何建议将是极大的AP preciated。

Any suggestions would be greatly appreciated.

推荐答案

甚至有一次你生成所有的字符,你会发现这不是一个有效的测试。某些字符是合并的标记,这意味着它们将与下一个字符组合来后,他们 - 有一个字符串全合成标记将没有多大意义的。还有其他一些特殊情况了。你会好得多在您需要支持的语言使用实际文本。

Even once you generate all the characters, you'll find it's not an effective test. Some of the characters are combining marks, which means they will combine with the next character to come after them - having a string full of combining marks won't make much sense. There are other special cases too. You'll be much better off using actual text in the languages you need to support.

这篇关于如何生成的UTF-8字符集在.net中的所有字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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