文件名称:utf8
介绍说明--下载内容均来自于网络,请自行研究使用
基本思路很简单,就用两个大数组:
UTF8 ->GBK
先从UTF8中解读出unicode值,再从数组中读出GBK值。
GBK->UTF8
直接以GBK的值为下标,查找数组中对应的UTF8值。
现在解决的问题:
1.可从UTF8转换到GBK编码
2.可对UTF8的编码格式作出判断,如某个UTF8不合要求或字节数不足,会自动跳过。
3.可从GBK编码转换到UTF8编码
未完成的问题:
1.计算字符串长度
2.在调用函数给要分配一定的缓存空间,如分配的空间不够大,会产生core down-Basic idea is simple, with two large arrays: UTF8-> GBK start with UTF8 in the Interpretation of the unicode value, and then read from the array GBK value. GBK-> UTF8 directly to the value of subscr ipt GBK, UTF8 find the corresponding array value. Now solve the problem: 1. Can be converted to the GBK encoding from UTF8 2. UTF8 encoding format can make judgments, such as a UTF8 deficient or insufficient number of bytes will be automatically skipped. 3. Transcoding from GBK to UTF8 encoding outstanding issues: 1. Calculate the string length 2. In the calling function to allocate a certain cache to space, such as allocation of space is not big enough, will have core down
UTF8 ->GBK
先从UTF8中解读出unicode值,再从数组中读出GBK值。
GBK->UTF8
直接以GBK的值为下标,查找数组中对应的UTF8值。
现在解决的问题:
1.可从UTF8转换到GBK编码
2.可对UTF8的编码格式作出判断,如某个UTF8不合要求或字节数不足,会自动跳过。
3.可从GBK编码转换到UTF8编码
未完成的问题:
1.计算字符串长度
2.在调用函数给要分配一定的缓存空间,如分配的空间不够大,会产生core down-Basic idea is simple, with two large arrays: UTF8-> GBK start with UTF8 in the Interpretation of the unicode value, and then read from the array GBK value. GBK-> UTF8 directly to the value of subscr ipt GBK, UTF8 find the corresponding array value. Now solve the problem: 1. Can be converted to the GBK encoding from UTF8 2. UTF8 encoding format can make judgments, such as a UTF8 deficient or insufficient number of bytes will be automatically skipped. 3. Transcoding from GBK to UTF8 encoding outstanding issues: 1. Calculate the string length 2. In the calling function to allocate a certain cache to space, such as allocation of space is not big enough, will have core down
(系统自动生成,下载前可以参看下载内容)
下载文件列表
utf8\codingBase.c
....\readme
....\utf8.c
....\zzop.h
utf8
....\readme
....\utf8.c
....\zzop.h
utf8