Python Kanji Conversion Phonetic Code
#-*-coding:utf-8-*-# return pinyin of Chinese charactersdef return_pinyin (word):Global ReslistFor line in Reslist:if (word==line[0]+line[1]) or (word==line[2]+line
[3]):str = lineBreak# take the content between ① and ②s = str.find (U ' ① ') +4E = str.find (U ' ② ') +3return Str[s:e]def getpy (word):#首先装载资源文件I=0Allstr = ' 'While IIf Ord (Word[i]) >127:If Allstr:Allstr + + return_pinyin (word[i]+word[i+1])E
1, today to investigate an Oracle database problem, found in 11g a Chinese character accounted for 2 bytes, in 10g accounted for 3 bytes, resulting in 11g database data import into 10g always error, at the beginning of the thought is 11g and 10g version is not the same, Chinese characters occupy a different number of bytes, and then I think, Oracle will not do so, so the difference is too big, and then a survey, found to be related to the Oracle Character set encoding:If it is the following char
Tags: http ar data div problem SP amp time adOracle database Chinese character ordering today needs to be sorted by one of the middle text segments of a table in the Oracle database, it would have been a simple thing, not an order by, but it was not right to find a shot, a time to feel incredible, and query, found that there is this problem, After finding out the data, Oracle ordered the Chinese in accordance with the value of the ASC code, and later looked up the data to find a function of hisO
Tags: article map sql pictures img Consumer POS targe OracleTransferred from: http://blog.csdn.net/u011575570/article/details/47414513Used to use oracle11g, a Chinese character accounted for 3 bytes, so in the operation of MySQL also has been allocated length.It's been tested today, and we found it wrong.You can see that the length of the first is really 15, but why is the second one 5?Find information on the Internet: Char_length calculates the length of the character, and length calculates the
PHP Kanji Conversion Pinyin and pinyin conversion of Chinese character program This is a pinyin and Chinese character conversion code, you can convert Chinese characters into Pinyin can also be converted in turn.
PHP tutorial Kanji Conversion Pinyin and Pinyin conversion Chinese character programThis is a pinyin and Kanji conversion code, you can convert Chinese
Oracle Kanji Pinyin (get full spell/pinyin initials/Pinyin intercept, etc.) the effect is as follows: Oracle Character set GBK no problem, UTF-8 need to modify SQL code--oracle kanji to Pinyin package--1. Get full spell SELECT gethzpy. Gethzfullpy (' kanji ') from DUAL; Results: Hanzi--2. Pinyin first letter SELECT Gethzpy. Gethzpycap ('
; /** Use: returns the number of Chinese characters in a string principle description:
Since the ASCII value of the Chinese character is between 4E00 and 9FA5, it is possible to convert the string to ASCII, judging whether the consecutive 5 bits are in this range, is the kanji, otherwise it is the other character. return value: Kanji number exception return: -1 */for NBSP;INBSP;INNBSP;1NBSP, .... NBSP;
Kanji to Pinyinseems to have been a difficult problem in C # development, no matter what the program has a certain bug, before using two scenarios. 1.chinese2spell.cs Some unrecognized kanji to Z2.Microsoft Visual Studio International Feature Pack 1.0 even the "wide", "district" can not turn, very disappointing.These are the 2010 before the program, at least there are heroes in the Chinese Pinyin constantly
iOS does not provide a simple Chinese pinyin sorting method, see the OC method on the Internet, here write the following Swift methodin as nsstring as nsstring = Cfstringconvertencodingtonsstringencoding (cfstringencoding (CFStringEncodings.GB_18030_2000.rawValue)) = nsstr1.stringbyaddingpercentescapesusingencoding (encode)! = nsstr2.stringbyaddingpercentescapesusingencoding (encode)! return temp1.compare (temp2) = = nscomparisonresult.orderedascen
Mb_strlen ("Hello 123", ' utf-8 '); // returns 5 strlen ("Hello"); // return a few I do not know, certainly not 2, but you want 2 to use the above substr ("Hello", 0, 1); // The return is garbled because you took a part of a Chinese character mb_substr ("Hello", 0,1, "utf-8"); // back to ' you 'The first number is the start position, the second number is the intercept length, the start position and the length can be negative, the equivalent of backwards, the specific testPHP
This article from http://www.cnblogs.com/yazdao/archive/2011/06/04/2072488.htmlFirst download Visual Studio International Pack 1.0, official: http://www.microsoft.com/downloads/zh-cn/details.aspx? FAMILYID=44CAC7F0-633B-477D-AED2-99AEE642FC10DISPLAYLANG=ZH-CN. After the download, decompression can find 7 MSI installation files, wherein Chspinyinconv.msi is a Chinese pinyin component, Chtchsconv.msi is to carry out a complex and simplified mutual transfer components, install the two MSI (the defa
/* Toolkit */var utils={/* Units */units: ' Implementing @#% billion ^~ ',/* characters */chars: ' 0123456789 ', /* Number to Chinese @number {Integer} shaped like 123 number @return {string} returns a string converted to a shape like 123 * # Tochinese:function (number) {var a= (number+ '). Split ('), s=[],t=this; if (a.length>12) {throw new Error (' too big '); }else{for (Var i=0,j=a.length-1;iHow to use:Original: http://www.codepearl.com/files/83.html JavaScript Digital to Chine
Yesterday in the conversion pinyin found a bug, there are many words can not be converted, but also can not blame him, after all, People's Coucay 8k, should only be used.Helpless on the Internet to find the next, found an article "the most full of php Chinese pinyin function (a total of 25961 characters, including 20,902 basic Chinese characters +5059 uncommon words)"Look at all the dick, the test is also good, can be identified, but the problem is not enough,, helpless, self-compression font (l
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.