Meaning
Charactersincludeletters,numbers,arithmeticsymbols,punctuationmarksandothersymbols,aswellassomefunctionalsymbols.Thecharactersarestoredinthecomputer,andthecorrespondingbinarycodesrepresentingthecharactersshouldbespecified.Theselectionofthecodeshouldbeconsistentwiththespecificationsoftherelevantperipheralequipment.Theseperipheraldevicesincludetheinputandoutputofthekeyboardconsole,theoutputoftheprinter,andsoon.Whenacharacterisinput,itmustbeautomaticallyconvertedintoabinarycodeandstoredinthemachine;whenoutput,thebinarycodeinthecomputerisautomaticallyconvertedintoacharacter,andtheconversionbetweenthetwoisrealizedbyperipheralequipment.Characteristhesmallestdataaccessunitinthedatastructure.Acharacterisusuallyrepresentedby8binarybits(abyte),buttherearealsoafewcomputersystemsthatuse6binarycharacterrepresentations.Thesizeofthecharactersetinasystemiscompletelydeterminedbythesystemitself.Thenumberofcharactersavailableforthecomputerisgenerally128to256(excludingChinesecharacters).Aftereachcharacterentersthecomputer,itwillbeconvertedintoan8-bitbinarynumber.Differentcomputersystemsanddifferentlanguageshavedifferentcharacterranges.
InASCIIencoding,anEnglishalphabetcharacterneeds1bytetostore.InGB2312encodingorGBKencoding,2bytesareneededtostoreaChinesecharactercharacter.InUTF-8encoding,anEnglishalphabetcharacterneeds1bytetostore,andaChinesecharactercharacterneeds3to4bytestostore.InUTF-16encoding,storageofanEnglishalphabetcharacteroraChinesecharactercharacterrequires2bytes(someChinesecharactersintheUnicodeextensionarearequire4bytestostore).InUTF-32encoding,thestorageofanycharacterintheworldrequires4bytes.
Expression
Charactersareabstractentitiesthatcanberepresentedusingavarietyofdifferentcharacterschemesorcodepages.Forexample,theUnicodeUTF-16encodingrepresentsacharacterasasequenceof16-bitintegers,whiletheUnicodeUTF-8encodingrepresentsthesamecharacterasasequenceof8-bitbytes.Microsoft'scommonlanguageruntimeusesUnicodeUTF-16(Unicodeconversionformat,16-bitencodingformat)torepresentcharacters.
Role
ApplicationstargetingtheMicrosoftCommonLanguageRuntimeuseencodingtomapcharacterrepresentationfromthenativecharacterschemetootherschemes.Theapplicationusesdecodingtomapcharactersfromanon-nativeschemetoanativescheme.
Computersandcommunicationequipmentwillusecharacterencodingtoexpresscharacters.Itmeansassigningacharactertosomething.Traditionally,itrepresentsanentirenumberofbitsequences.Inthisway,itcanbetransmittedthroughthenetworkandisalsoeasytostore.TwocommonexamplesareASCIIandUTF-8forUnicode.AccordingtoGoogle'sstatistics,UTF-8isthemostcommonlyusedencodingmethodforwebpages.Comparedwithmostcharacterencodingsthatcorrespondtoanumberorbitstring,Morsecipherusesasequenceofelectronicpulsesofindefinitelengthtorepresentcharacters.