PHP converts the number 1.1 billion to a kanji representation, such as 150 turns 150
Directly on the instance
Written to hundreds of billions.
/**
* @author ja Ode* Replace the number 1.1 billion with Chinese characters, such as:123-> 123* @param [num] $num [number]* @return [string] [string]*/function Numtoword ($num){$chiNum = Array (' 0 ', ' one ', ' two ', ' three ', ' four ', ' V ', ' VI ', ' VII ', ' VIII ', ' IX ');$chiUni = Array (' ', ' ten
Text processing often determines whether a string is a letter, a number, or a Chinese character, and the Python str module provides methods but does not support Unicode, so imitating the Str method enables the kanji/digit/alphanumeric method of Unicode strings, as well as full-width half-width conversions.
#!/usr/bin/env python #-*-coding:utf-8-*-import sys #set default encoding as UTF-8 reload (SYS) Sys.setdefaultencodi Ng (' utf-8 ') #judge a cha
Original: SQL to the URL encoding to Chinese characters!--=============================================--Author: ruijc--Description: Convert URL encoding to clear text string--================================ =============create FUNCTION Fn_urldecode (@Str varchar (8000)--encoded string) RETURNS varchar (8000) Asbegin DECLARE @ Position INT; --the '% ' character is located DECLARE @Chr CHAR (16); --character constant DECLARE @Pattern CHAR (21); DECLARE @ParseStr VARCHAR (8000);--Th
Label:Used 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 length of the byte, just as I am using UTF8, a Chinese character that occupies 3 bytes and occupies a single character.Well, it
Tags: result requires package COM HTTP BSP collation ACL OracleOracle Kanji Pinyin (get full spell/pinyin initials/Pinyin intercept, etc.)The effect is as follows: Oracle character Set GBK no problem, UTF-8 needs to be modifiedSQL code--oracle Kanji to Pinyin package--1. Get full spellSELECT gethzpy. Gethzfullpy (' kanji ') from DUAL;Results: Hanzi--2. Pinyin Fir
Tags: Modify result cap package developer Evel Paste Oracle nbspOracle 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 www.2cto.com SELECT gethzpy. Gethzfullpy (' kanji ') from DUAL; Results: Hanzi--2
//after the kanji is pinyin, the first letter is truncated and capitalized-(NSString *) Transformcharacter: (nsstring*) sourcestr{//convert the original string to a mutable string firstNsmutablestring *ms =[nsmutablestring Stringwithstring:sourcestr]; if(ms.length) {//convert kanji to pinyinCfstringtransform (__bridge cfmutablestringref) MS,0, Kcfstringtransformtolatin, NO); //to remove the tones of pinyinC
Bit-----bit, bit, both of which can be said. It is the smallest unit of storage data in the computer.For example: 1111 1111 or 0000 0000 Each 1 or each 0 is a bit.byte--byte (denoted by B), which is the basic unit of computer storage capacity1 byte = 8 bit = "A" or "B"//is a letter of 26 letters anyway.2 byte = 1 Kanji =2 * 8=16 bit (this sentence can also be written in 2b=1 kanji =16 bit)Kb1 KB = 1024x768
/***+------------------------------------------------------* PHP kanji to Pinyin*+------------------------------------------------------* How to use:* $py = new PinYin ();* Echo $py->getallpy ("Output kanji all pinyin"); Shuchuhanzisuoyoupinyin* Echo $py->getfirstpy ("Output Chinese pinyin"); Schzspy*+------------------------------------------------------*/Class PinYin {Private $pylist = Array (' A ' =>-203
{ for(inti = 0; i ) { //determine if the character is Chinese characters if(Java.lang.Character.toString (T1[i]). Matches ("[\\u4e00-\\u9fa5]+")) {//regular expressions that match at least one kanjit2 =Pinyinhelper.tohanyupinyinstringarray (t1[i], T3); T4+ = T2[0]; } ElseT4+=java.lang.Character.toString (T1[i]); } returnT4; } Catch(badhanyupinyinoutputformatcombination E1) {e1.printstacktrace (); } returnT4; } //returns the first le
Problem description counts the number of Chinese characters in a given text file.The input file first contains an integer n, which indicates the number of test instances, followed by the N-segment text.Output for each piece of text, outputs the number of characters in it, and the output of each test instance takes one row.[Hint:] From the characteristics of the Chinese character machine internal code to consider ~Sample input2wahaha! wahaha! This year the festival does not speak to speak only Pu
])) {//Determine if it is a kanji
$chinese = $spellArray [$str _arr[0]];
$result = $chinese [0];
}else {
$result = $str _arr[0];
}
$result = $isOne? SUBSTR ($result, 0,1): $result;
Return $upper Strtoupper ($result): $result;
}
/**
* @desc Convert a string into a phonetic string
* @param $string Kanji string
* @param $upper Uppercase or lowercase
* @return String
*
* For example: Getchinesechar (' I am t
Sometimes the project will be based on the user's name pinyin retrieval data, Microsoft has provided a component installation package to handle non-English special language, calledMicrosoft Visual Studio International PackDownload this installation package, and then install the Simplified Chinese componentThe default installation path is: C:\Program Files (x86) \microsoft Visual Studio International pack\simplified Chinese Pin-yin Conversion LibraryTo use this
PHP kanji to Pinyin (Dede)Pull an outer chain, huh!Http://www.tao11.cn/a0b923820dcc509a.htmlHttp://www.tao11.cn/9d4c2f636f067f89.htmlHttp://www.tao11.cn/4b5ce2fe28308fd9.htmlHttp://www.tao11.cn/bbce2345d7772b06.htmlThe inside of the Pinyin.dat is nearby.
/**
* Kanji
* @param string $str strings to be converted
* String encoding @param string $charset
* @param bool $ishead Wheth
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.