Do you know how to convert the characters of php into pinyin word header?

Source: Internet
Author: User

In GB 2312, the received Chinese characters are "partitioned", each containing 94 kanji/symbols. This representation is also known as the location code. 1) zone 01-09 is a special symbol. 2) Area 16-55 is a first-level Chinese character, sorted by pinyin. 3) 56-87 District is a two-level Chinese character, sorted by radical/stroke. 4) Zones 10-15 and 88-94 are not coded.

In programs that use GB2312, the EUC storage method is usually used in order to be compatible with ASCII. The "GB2312" on the browser encoding table is usually referred to as "EUC-CN" notation. Each character and symbol is represented by two bytes. The first byte is called the "high Byte" (also known as the "region byte"), and the second byte is called the "low Byte" (also known as the "bit byte").

"High byte" uses 0xa1-0xf7 (the area code of Zone 01-87 plus 0xA0), "Low byte" uses 0xa1-0xfe (01-94 plus 0xA0). Since the first level of Chinese characters from the beginning of the 16 district, the Chinese character area "high-byte" range is 0xb0-0xf7, "low-byte" range is 0xa1-0xfe, occupies the code point is 72*94=6768.   5 of these seats are d7fa-d7fe. For example, in most programs, the word "ah" is stored in two bytes, 0xb0 (the first byte) 0xa1 (the second byte).   Location Code = Region byte + bit byte (compared to Location code: 0XB0=0XA0+16,0XA1=0XA0+1). Design: Use an array to hold the national standard first-class Chinese characters different pronunciation of the starting location code: such as static final int[] Secposvaluelist = {1601, 1637, 1833, 2078, 2274, 2302, 2433, 2   594, 2787, 3106, 3212, 3472, 3635, 3722, 3730, 3858, 4027, 4086, 4390, 4558, 4684, 4925, 5249, 9999}; A data store holds the national standard first-class Chinese characters different pronunciation of the starting location code corresponding to the pronunciation of static final char[] Firstletter = {' A ', ' B ', ' C ', ' d ', ' e ', ' f ', ' g ', ' H ', ' J ', ' K ', ' l   ', ' m ', ' n ', ' o ', ' P ', ' Q ', ' R ', ' s ', ' t ', ' W ', ' x ', ' y ', ' z '}; Processing method: 1. Judge whether it is the mother of English 2. If yes, return directly to the mother of English 3. The encoded value of the character 4 is taken. Compare the position of the coded value in the Code table.

5. Return the corresponding value in the parent table according to the position value

AC qq:2881064157

Do you know how to convert the characters of php into pinyin word header?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.