文件名称:utf8
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:179.22kb
-
已下载:2次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
基本思路很简单,就用两个大数组:
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
utf8/readme
utf8/utf8.c
utf8/zzop.h
utf8
utf8/readme
utf8/utf8.c
utf8/zzop.h
utf8
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.