= iconv ('utf-8', 'gb2312', $ str );}$ Words = $ this-> _ cutWord ($ str );Foreach ($ words as $ word){If ($ this-> _ isAscii ($ word )){/* Non-Chinese */$ Result [] = $ word;Continue;}$ Code = ord (substr ($ word, 0, 1) * 1000 + ord (substr ($ word, 1, 1 ));/* Get the A--Z of the first letter of pinyin */If ($ I = $ this-> _ search ($ code ))! =-1){$ Result [] = $ this-> _ pinyins [$ I];}}Return strtouppe
{ $word=$this-GT;_MSUBSTR ($str, 0, 1); $words[] =$word; $str=substr($str,strlen($word)); } } return $words; } /** * Determines if a character is an ASCII character * * @param string $char * @return bool*/ Private function_isascii ($char) { return(Ord(substr($char, 0, 1)) ); } /** * Determines whether the first 3 characters of a string are ASCII characte
1. Pinyin the smallest size, Poapinyin's statement is almost 500 lines.
2. The speed is in fact similar to three, but do not use the Poapinyin native of that convert, that each time traversal lookup is very slow.
3. Contrast pinyin can only get the first letter of Chinese phonetic Alphabet, Pymethod was originally applied to the stock query, its number of
There are many algorithms for ASP and PHP to use Chinese pinyin, but these algorithms are not very effective in C # Because in ASP, PHP, Delphi, and other languages, they represent characters in the "ANSI" way, that is, the program stores the inner code of Chinese characters
A colleague needs to query the database based on Chinese characters abbreviated to PinYin on the webpage a few days ago. Today, I found some pinyin resources from the Internet, and extracted and simplified them into the database. According to this pinyin database, we made a
= iconv ('utf-8', 'gb2312', $ str );}$ Words = $ this-> _ cutWord ($ str );Foreach ($ words as $ word){If ($ this-> _ isAscii ($ word )){/* Non-Chinese */$ Result [] = $ word;Continue;}$ Code = ord (substr ($ word, 0, 1) * 1000 + ord (substr ($ word, 1, 1 ));/* Get the A--Z of the first letter of pinyin */If ($ I = $ this-> _ search ($ code ))! =-1){$ Result [] = $ this-> _ pinyins [$ I];}}Return strtouppe
Experience in converting Chinese characters to pinyin (non-data table version) from the acquisition to the Pinyin function
Experience in converting Chinese characters to pinyin (non-dat
A Web site can be unlimited, your site can be the achievement of your career!This is not an empty word, but a workable solution.Today ze Yip Construction Station NET Webmaster Yang Zeyi to explain to you the most simple website function increase.Now added is the "Kanji to Pinyin" The new function as an example, let you know, your site can add countless features.Because I am communicating with other people, many people send the name, incredibly often c
A Web site can be unlimited, your site can be the achievement of your career!This is not an empty word, but a workable solution.Today Yang Zeyi to explain to you the simplest of the Web site features of the increase.Now added is the "Kanji to Pinyin" The new function as an example, let you know, your site can add countless features.Because I am communicating with other people, many people send the name, incredibly often can not be completely correct t
This article illustrates the usage of Chinese pinyin pinyin4j in Java. Share to everyone for your reference, specific as follows:
Chinese pinyin conversion is a common problem in the daily development. For example, our great 12306, in the place name input "WH", will appear "Wuhan" "Wuhu" "Weihai" and other place names
Oracle alphabetical order with Chinese pinyin first letter functionAccording to the Chinese pinyin first alphabetical order, obtains the Chinese Pinyin first letter functionThe first letter, stroke and radical sort function "Nlsso
1. Background: During the project, a small business that displays the customer Department name (pinyin) means that there is a corresponding pinyin under the department name, but there is no corresponding field in the existing database, in addition, the number of departments is relatively large, and it takes a long time to add them. I wonder if it can be implemented in js and processed on the page.2. Princip
1. Pinyin the smallest size, Poapinyin's statement is almost 500 lines.2. The speed is in fact similar to three, but do not use the Poapinyin native of that convert, that each time traversal lookup is very slow.3. Contrast pinyin can only get the first letter of Chinese phonetic Alphabet, Pymethod was originally applied to the stock query, its number of
To get the first letter of the Chinese:This is the class that converts Chinese to pinyin: charset/*** Chinese characters converted to pinyin, Pinyin converted to Chinese
A Web site can be unlimited, your site can be the achievement of your career!This is not an empty word, but a workable solution.Today ze Yip Construction Station NET Webmaster Yang Zeyi to explain to you the most simple website function increase.Now added is the "Kanji to Pinyin" The new function as an example, let you know, your site can add countless features.Because I am communicating with other people, many people send the name, incredibly often c
-------------------------------42 countries3 personsMedium*/
Example 2: sort the content of the table NAME column by the last NAME strokes:
Create table # t (id int, name varchar (20 ))
Insert # t select 1, '3'Union all select 2, 'B'Union all select 3, '2'Union all select 4, '1'Union all select 5, '10'Select * from # t order by name collate Chinese_PRC_Stroke_CS_AS_KS_WSDrop table # t/* Result:Id name-------------------------------4yi2 B3 II5th1 3*/
4. Application extension of sorting rules in p
Chinese characters converted into phonetic function, write to URL can do search engine optimization
The following is a reference fragment:Translate Chinese characters into pinyin and
Chinese characters converted into phonetic function, write to URL can do search engine optimizationTranslate Chinese characters into pinyin and write to URLs to do Google optimizationCa
sogou Pinyin Input Method How to set the Chinese symbol? sogou Pinyin Input method is the domestic use of the most users of an input method tool, it's typing with high efficiency, multi-function, intelligent and so on characteristics known. However, sogou Pinyin input method How to play Hanyu
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.