82 coding for the vernacular
来源:互联网 发布:网络保密自查报告 编辑:程序博客网 时间:2024/06/05 07:56
Author: Scruffybear, date: 8-June-2009
The SIM sends out proactive command which include Unicode to display vernacular language menu item, for example chinese character or India local language, but for unicode, one character will occupy two bytes, the proactive command will easily exceed 255 bytes, when the proactive command is too long, the handset will be hanging. My colleague help me solved this problem by using 82 coding.
The reference for the 82 coding is in GSM11.11 'Annex B', you can go there to check the detail.
example:
80 coding
800D2C0D4B0D330D3F0D350D410D210D4D(this is India local language Malayalam)
transfer to 82 coding
82080D00ACCBB3BFB5C1A1CD
explain as below:
82(coding method) 08(length, begin after the base pointer) 0D00(Base pointer)AC(byte one, offset from the base pointer, here is 0D2C-0D00+80=AC)CB(byte two, here is 0D4B-0D00+80=CB) .... ....
Just like this, lots of bytes had been saved, for this example, the 80 coding occupys 17 bytes, by using 82 coding 12 bytes, saves (17-12)/17=30% bytes, if there are more characters, i think will save more, because the header part will take less percentage in the whole length.
Someone may ask, why in the calculation of offset have to add 0x80? good question, check the AnnexB, you can find the answer, the original text reads,
'if bit 8 of the octet is set to zero, the remaining 7 bits of the octet contain a GSM Default Alphabet character, whereas if bit 8 of the octet is set to one, the remaining seven bits are an offset value added to the base pointer defined in octets three and four, and the resultant 16 bit value is a UCS2 code point, and defines a UCS2 character.'
- 82 coding for the vernacular
- coding style for the linux kernel
- coding style for the linux kernel
- The 10 most popular coding challenge websites for 2017
- Coding Convention for C
- Coding Guidelines for Cocoa
- Happy for Coding
- Career for coding
- Coding Guidelines for Cocoa
- Coding GuideLines For Cocoa
- coding for mac
- Cracking the Coding Interview
- 《Cracking the coding interview》
- Cracking The Coding Interview
- Cracking the coding interview
- the begining of coding
- Cracking the coding interview
- Coding On the Way
- 预言:时间和距离最终将成为爱情的断头台
- VC++实现把一个对话框最小化到任务栏托盘
- delphi中用api创建多线程的简单例子
- DB FINAL PROJECT
- May 2009
- 82 coding for the vernacular
- PHP LOGIN PAGE
- 程序员也要讲理财
- C#字符串反转
- 真是不打不相识啊~
- Merger into
- js表单验证控制代码大全
- 如何去掉Form的标题栏?
- 初来乍到的菜鸟..多多指教...