The best use of php kanji to Pinyin class: Pinyin

Source: Internet
Author: User
Pinyin

The simplest and most accurate class of php Chinese pinyin

Support to get pinyin and pinyin abbreviation is the first letter

Support Utf-8, GBK and other encodings

Can accurately match more than 6,000 commonly used Chinese characters

A single Chinese character, a word, both Chinese and English mix perfectly support

Example version Utf-8

Include_once ' pinyin.php ';    Echo Pinyin::getpinyin ("Good Morning");//get Pinyin  echo Pinyin::getshortpinyin ("Good Morning");//get Pinyin abbreviations  

Example version GBK

Include_once ' pinyin.php '; Echo pinyin::getpinyin ("Good Morning", ' gb2312 ');//Get Pinyin echo pinyin::getshortpinyin ("Good Morning", ' gb2312 ' );//get Pinyin abbreviations

Project home:http://www.open-open.com/lib/view/home/1435299355872

  • 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.