Originally posted by Ben Shi at 2007-3-26 05:22:
Suggestion: Adjust to... The entire character set is in the universal Chinese character set format.
Universal HZK16.GBK library
The calculation method of the record number in units of 32 bytes is as follows
(Assuming that the high byte of the Chinese character is in ch1 and the low byte is in ch2):
if ch1>A0h then
if ch2>A0h then '1-94:A1~FE || A1~FE
rec=(ch1-A1h)*94+(ch2-A1h)
else '159-254:A1~FE || 40~A0
rec=94*94+31*94+31*96+(ch1-A1h)*96+(ch2-40h)
-(ch2/128)
endif
else
if ch2>A0h then '95-126:81~A0 || A1~FE
rec=94*94+(ch1-81h)*94+(ch2-A1h)
else '127-159:81~A0 || 40~A0
rec=94*94+31*94+(ch1-81h)*96+(ch2-40h)
-(ch2/128)
endif
endif
[
Last edited by Ben Shi on 2007-3-26 at 09:03 AM ]
my major is english----my love is dos----my teacher is the buddha----my friends--how about U