当前位置:网站首页>关于取模数据序号定位的说明 区码定位是指GBK编码
关于取模数据序号定位的说明 区码定位是指GBK编码
2022-06-24 06:41:00 【小黄人软件】
关于取模数据定位的说明:
以GBK为例
GBK 对 GB2312 进行了扩展。第一字节为 0x81~0xFE,第二字
节分两部分,一是 0x40~0x7E,二是 0x80~0xFE。
即(0x7f-0x40+0xff-0x80)=一个区190个字。
定位方法如下:
第一个字节减去 0x81,则是正确的区位,每个区的大小要根据每个字所占用的字节×190
(0x7f-0x40+0xff-0x80)即可。如果第二个字节小于 0x7f 则减去 0x40,
如果第二个字节大于等于 0x80 则减去 0x41。
定位的高位=(区码高位-0x81)*0xBE
定位的低位= 如果 区码低位<0x7F ,区码低位-0x40
如果 区码低位>=0x80 ,区码低位-0x41
比如D2BB 一
定位的高位=D2-81 =0x51
定位的低位=BB-41 =0x7A
0x51*0xBE+0x7A=0x3C98=15512
即
定位1对应区码0x8140 丂
定位2对应区码0x8141 丄
定位190对应区码0x8240 侤
定位15512对应区码0xD2BB 一

边栏推荐
- 0 foundation a literature club low code development member management applet (II)
- Outils de débogage JVM - Arthas
- File system notes
- Are internal consultants and external consultants in SAP implementation projects difficult or successful? [English version]
- Go operation SQLite code error
- [JUC series] completionfuture of executor framework
- 你有一个机会,这里有一个舞台
- Mysql开启BINLOG
- The cloud monitoring system hertzbeat V1.1.0 is released, and a command starts the monitoring journey!
- On update current in MySQL_ TIMESTAMP
猜你喜欢

潞晨科技获邀加入NVIDIA初创加速计划

Maui uses Masa blazor component library

Nine unique skills of Huawei cloud low latency Technology
![[binary tree] - middle order traversal of binary tree](/img/93/442bdbecb123991dbfbd1e5ecc9d64.png)
[binary tree] - middle order traversal of binary tree

leetcode:85. Max rectangle

JVM調試工具-Arthas
![[JUC series] completionfuture of executor framework](/img/d0/c26c9b85d1c1b0da4f1a6acc6d33e3.png)
[JUC series] completionfuture of executor framework

【愚公系列】2022年6月 ASP.NET Core下CellReport报表工具基本介绍和使用

Spark项目打包优化实践

Introduction to raspberry pie 4B development board
随机推荐
Are internal consultants and external consultants in SAP implementation projects difficult or successful? [English version]
System design: partition or data partition
Use of SQL join
JVM调试工具-jvisualvm
Audio knowledge (V) -- data processing
How to build an app at low cost
Spark参数调优实践
. Net7 miniapi (special part):preview5 optimizes JWT verification (Part 1)
Application configuration management, basic principle analysis
An example of MySQL accidental deletion recovery - using Myflash
机器人迷雾之算力与智能
App management platform app host
【云驻共创】华为云HCIA-IoT V2.5培训系列内容之物联网概览
Decryption of the original divine square stone mechanism
Multi sensor fusion track fusion
[cloud based co creation] overview of the IOT of Huawei cloud HCIA IOT v2.5 training series
leetcode:85. Max rectangle
树莓派4B开发板入门
0 foundation a literature club low code development member management applet (5)
[binary tree] - middle order traversal of binary tree