
COMPUTER ENGINEERING
1999 25 10 Vol.25 No.10 1999



ASCIIʶӦϵͳ
ʷ͢
ժҪΨһʶASCIIķַԹ㷺ӦӦϵͳĿϵͳЧʺЧʡ
ؼʣģʶASCII룻ݿ
ASCII Identification of Chinese Characters and the Development of Application Systems
Shi Tingchun
(Hebei Institute of Technology,Tangshan 063009)
AbstractAn ASCII identification method of Chinese Characters is introduced which can widely applied in application systems and greatly improved the efficiencies of both development and operation.
Key wordsChinese Characters;Identification;ASCII;Databases
ӦϵͳڸиҵĹЩϵͳĿԱͼû߼Чʣûᡣ
ڶϢȡҪϢʱϣܹѺĳֹ࣬Թ˲ҪϢ磬λȣƴ࣬СɸѡΧȻõݿ⿪ϵͳδṩӦˣʶϢȡӦ룬ΪԱ⡣
1ȡΨһʶ
ͨдԺƴͷΪݵĲ˵ԺܼݵذѴϢֳ಻26顣ûֻҪ֪ҪʻƴͷƴĵһĸͿֱӽϢĲѯȻε֪ÿֵƴͷأû¼ʱƴͷķǣⲻ׳ŹͬʱҲΥ˼û빤ԭ
΢ݿϵͳһѯַASCIIĺASC()֪˳Ǻƴصġͬʱ˳ֺλءˣλ»ֵ佫ÿһͷµĵͺ--ͬͷһֺһ--һֽڵASCII񣬱ݡ磬AͷĺASCII²
?'a',asc(''),asc(''),asc(''),asc('')
BͷĺASCII²
?'b',asc(''),asc(''),asc(''),asc(''),asc
('')
нΪAͷֵĵһֽASCIIΪ176BΪ176178ˣABͷĽ޷ں޷ΨһABͷһͷͬڡΪ˽һ⣬߽һ˷ֽ纺ֵĵڶֽASCII롣䷽ǽȡֵĵڶֽϢASC()жϡ
asc(righ('',1))asc(righ('',1))asc
(righ('',1))õֽ纺ֵ˫ASCII롣ʹ˫룬Գ׽ںϵ⡣
磬Aͷλ176λ161196Bͷִλ176178λ197192ͨȷͷϸλ磺ChnΪѾȡõϢڴ
If asc(Chn)=176.and.asc(righ(Chn,1))>=161;
.and.asc(righ(Chn,1))<=196
ͷԣ*A*
endi
ƺ˺ƴͷ⡣ʵô򵥡磬Nͷĺ֣λΪ196197λΪ195182λΪ196ʱλ>=195λΪ197ʱλ<182 
һ½綨
If asc(Chn)>=196.and.asc(Chn)<=197
.and.asc(righ(Chn,1))>=195.and.asc(righ(Chn,1))<182
ͷԣ*N*
endi
Ľ߼ϿС߽Ϊ195߽СΪ182ˣûĺ֣нԶǿռ
Ϊ˽߽纺ASCIIֵӱϿ߼⡣Ժȫϸµоֵֺλ176ʼ215λ161255֮ڡΪ˸ӿѧϽؽ綨ֱ߽֣ͨCase临If佫ϸ֡磺
Do case
 case asc(Chn)=196
 if asc(right(Chn,1))>=195
ͷԣ*N*
 endi
 case asc(Chn)=197
 if asc(right(Chn,1))<=182
ͷԣ*N*
endi
Endc
2
ĿӴϢӡͨƴͷԿԽֻֽ26ӼASC()Ի֪ÿֵASCII롣ͨÿӼĴ룭ƴͷ綨ÿֵӼԡͨ˫ֽ򣬼ȿԶ躺Ϣֿɴû¼ߺӦϵͳĿͲЧʡԼչɶԺַиϸĻ֣ʵָСӼ
߼飺ʷ͢1966УʦʿԼӹ̵ֵģ⣬չƣݿϵͳ
ߵλӱѧԺеϵɽ063009
ոڣ1999-03-08
