Get the location code of Chinese characters with .NET (C #)

xiaoxiao2021-03-06  54

First review the basic knowledge of the computer:

The bottom of the computer is represented by binary and 0 and 1. Each 0 or 1 is called 1 bit, and the 8th binary number is called 1 byte, which can represent one of the ASCII codes. The Chinese computer uses two bytes, 16-bit binary, represents a Chinese character. All symbols in the Unicode encoding (including Chinese characters, English, headings, and other many symbols) are represented for two bytes (16).

In the system.text namespace contains numerous encoded classes, you can perform operational and conversion, the following uses two instances to perform interchange between zone code and Chinese characters, I hope you can play a two-way effect, let everyone can handle it easily Text coding problem:

using System; using System.Text; class CodingChange {public string CharacterToCoding (string character) {string coding = ""; for (int i = 0; i test1162ec4e847627592d4efd560cff2f667d5928578476004e2a4eb65b2e00 our Greater China, is good in a home.

转载请注明原文地址:https://www.9cbs.com/read-113247.html

New Post(0)