Home Tekniikka Sisäinen koodi

Sisäinen koodi



Introduction

InternalcodereferstothebinarycharactercodeusedinthecomputerChinesecharactersystem.Itistheexchangecodebetweenthecommunicationinput,outputandthesystemplatform.TheinternalcodecanachieveuniversalandhighThepurposeofefficienttransmissionoftext.Forexample,whatisstoredandcalledinMSWordisinternalcodeinsteadofgraphictext.EnglishASCIIcharactersarerepresentedbyaone-byteinternalcode.Chinesecharacterssuchasthenationalstandardcharacterset,GB2312,GB12345,andGB13000allusedouble-byteinternalcodes,GB18030(27,533Chinesecharacters)double-byteinternalcodeChinesecharactersare20,902,andtheremaining6,631Chinesecharactersuseafour-byteinternalcode.

Classification

Characterencoding:Thecharacterencodingisthebinarynumbercorrespondingtothecharactersofthecharacterset.ThemostcommonlyusedcharactersetisANSI,andthebinaryencodingcorrespondingtotheANSIcharactersetisCalledANSIcode,DOSandWindowssystemsbothuseANSIcode,butthecharactercodeusedinthesystemmustundergobinaryconversion,whichiscalledsysteminternalcode.

Chinesecharacterinternalcode:ANSIcodeisasinglebyte(8-bitbinarynumber)encodingset,whichcanonlyrepresent256charactersatmost,andcannotrepresentmanyChinesecharacters.TheANSIcodeofvariouscountriesandregionsOnthebasisofthis,avarietyofdifferentChinesecharacterencodingsetsaredesignedtobeabletohandlealargenumberofChinesecharacters.ThesecodesusesinglebytetorepresentANSIEnglishcharacters(thatis,compatiblewithANSIcode),andusedoublebytestorepresentChinesecharacters.SincetherecanonlybeoneChinesecharacterinternalcodeinasystem,thecharactersofotherChinesecharacterinternalcodescannotberecognized,whichcausescommunicationinconvenience.

GBcode:GBcodeisasimplifiedChinesecharactercodingschemeannouncedbythecountryin1980,andiswidelyusedinmainlandChinaandSingapore,alsoknownasthenationalstandardcode.Thenationalstandardcodeencodes6763Chinesecharactersets,coveringmostoftheChinesecharactersinuse.

GBKcode:GBKcodeisanextendedcharacterencodingofGBcode,whichencodesmorethan20,000simplifiedandtraditionalChinesecharacters.SimplifiedversionsofWin95andWin98bothuseGBKassysteminternalcode.

BIG5code:BIG5codeisaChinesecharacterencodingfortraditionalChinesecharacters,whichiscommonlyusedincomputersystemsinTaiwanandHongKong.

HZ-koodi:HZ-koodi on kiinalainen merkkikoodi, jota käytetään laajasti Internetissä.

ISO-2022CJKcode:ISO-2022isacodingstandardestablishedbytheInternationalStandardsOrganization(ISO)forvariouslanguagecharacters.Two-byteencodingisadopted,inwhichtheChineseencodingiscalledISO-2022CN,andtheJapaneseandKoreanencodingsarecalledJPandKRrespectively.Generally,thethreearecollectivelyreferredtoastheCJKcode.TheCJKcodeismainlyusedintheInternetnetwork.

Unicodecode:Unicodecodeisalsoaninternationalstandardcode,whichusestwo-byteencodingandisnotcompatiblewithANSIcode.Itisusedinthenetwork,Windowssystemandmanylarge-scalesoftware.

Internalcodeconversion

Duetohistoricalandregionalreasons,sometimesmultipleencodingschemesappearinonetext,especiallyChinesecharacters.Sincecharactersdifferentfromthesysteminternalcodecannotbedisplayednormallyinthesystem,theinternalcodeconversionofthecharactersmustbecarriedout,thatis,thecharactersthatarenotthesysteminternalcodeareconvertedintotheinternalcodecharactersthatcanberecognizedbythesystem.NJStarissuchanexcellentsoftware.OtherssuchasSitongLifang,MagicWin98,Cross-StraitCommunication,ChineseCharacterCommunication,etc.areallsuchinternalcodeconversiontools.

Keskivuoroinen muuntaminen

Sijaintikoodin, kansallisen standardikoodin ja koneen sisäisen koodin muunnossuhde:

(1)Thelocationcodeisfirstconvertedintohexadecimalnumberrepresentation

(2)(Sijaintikoodin heksadesimaaliesitys)+2020H=kansallinen standardikoodi;

(3)kansallinen standardikoodi+8080H=koneensisäinen koodi

Esimerkki:Kiinalainen merkki"大"esimerkiksi,"大"-aluekoodi on 2083

Ratkaisu: 1. Aluekoodi on20 ja bittinumero on83

2.Thelocationnumber2083isconvertedtohexadecimalandexpressedas1453H

3 1453H+2020H=3473H, hanki kansallinen standardikoodi 3473H

4,3473H+8080H=B4F3H, hanki sisäinen koodi B4F3H

Yhteenveto:Merkkikoodauksen kaksi esitystapaa: ASCII (merkkien esitys);GB2312 (kansallinen standardikoodi, kiinalainen merkkikoodaus)

Aiheeseen liittyvät erot

1.Ulkoinen koodi on ulkomaailmasta syöttämäsi merkki.Tämän merkin syöttämisen jälkeen tuleevastaava sijaintikoodi (eli 94*94-ruudukko),kiinalainen merkki,syötetyt rivi+onsaa

2,thelocationcodecanbeconvertedintothenationalstandardcodeafterconversion(sothelocationcode→nationalstandardcodestepjustmeansconversion),

3,Thenationalstandardcodecanbeconvertedintotheinternalcode(usuallyrepresentedbyahexadecimalnumber)afterconversion.

This article is from the network, does not represent the position of this station. Please indicate the origin of reprint
TOP