Chinese character-to-pinyin solution for IOS platform, Chinese character-to-pinyin solution for ios platform

Source: Internet
Author: User

Chinese character-to-pinyin solution for IOS platform, Chinese character-to-pinyin solution for ios platform

IOS/Mac OS X conversion of Chinese characters to PinYin the popular Chinese character to PinYin solution includes a pinyin code table, which is fast. In fact, the Core Foundation also provides a solution with a tone!

Java code
  • NSMutableString * ms = [[NSMutableString alloc] initWithString: @ "I am a Chinese"];
  • If (CFStringTransform (_ bridge CFMutableStringRef) MS, 0, kCFStringTransformMandarinLatin, NO )){
  • NSLog (@ "Pingying: % @", MS); // w release sh release zh release ng guó Ré n
  • }
  • If (CFStringTransform (_ bridge CFMutableStringRef) MS, 0, kCFStringTransformStripDiacritics, NO )){
  • NSLog (@ "Pingying: % @", MS); // wo shi zhong guo ren
  • }
  • NSMutableString * ms = [[NSMutableString alloc] initWithString: @ "I am Chinese"]; if (CFStringTransform (_ bridge CFMutableStringRef) ms, 0, numeric, NO )) {NSLog (@ "Pingying: % @", MS); // w ǒ sh %zh %ng guó rén} if (CFStringTransform (_ bridge CFMutableStringRef) MS, 0, kCFStringTransformStripDiacritics, NO) {NSLog (@ "Pingying: % @", MS); // wo shi zhong guo ren}

    Create index SQL-statement: = CREATE [UNIQUE] INDEX [IF NOT EXISTS] [database-name.] index-name ON table-name (column-name [, column-name] *) column-name :: = name [COLLATE collation-name] [ASC | DESC] The create index Command is run by the "create index" keyword followed by the name of the new INDEX, the keyword "ON", the name of the table to be indexed, and the list of fields used for index keys in the ARC. Each field name can follow the "ASC" or "DESC" keyword to describe the sorting rule, but the sorting rule is ignored in the current version. The sorting is always in ascending order.
    Each field name is followed by the COLLATE clause to define the comparison sequence of text records. The default comparison sequence is the comparison sequence described by the create table statement. If the comparison sequence is not defined, the built-in binary comparison sequence is used.
    There is no limit on the number of indexes attached to a single table, and there is no limit on the number of fields in the index.
    If the UNIQUE keyword appears between CREATE and INDEX, duplicate INDEX records are not allowed. An error occurs when you try to insert a duplicate Name Record.
    The text of each create index statement is stored in the sqlite_master or sqlite_temp_master table, depending on whether the table to be indexed is a temporary table. Each time a database is opened, all the create index statements are read from the sqlite_master table to generate the internal structure of the SQLite INDEX style.
    IF the optional if not exists clause is used and an index with the same name EXISTS, the command is invalid.
    Use the drop index command to delete an INDEX.


    How can Chinese characters be quickly converted into pinyin?

    1. input the Chinese characters, phrases, or paragraphs you want to add to pinyin, or even a small article into the Word documents. 2. Select the Chinese characters you want to mark with pinyin; 3. Click "format" in the Document menu, click "Chinese version" in the drop-down menu, and select "pinyin Guide "; 4. In the "pinyin Guide" dialog box, select "OK ". Note that this method can only mark pinyin for 40 Chinese characters at a time. if you want to mark a short article with pinyin, you can only mark it in one segment. Otherwise, you need to install the pinyin-based software. supplement: select the text to be pinyin in WORD, click "format/Chinese Version/pinyin Guide", and select the alignment mode, Font, and font size. After the preview is satisfactory, click "Combination/OK.

    How to convert EXCEL Chinese characters to PinYin

    In word and EXCEL, you can:
    Selected content ---- format --- pinyin Guide

    However, in EXCEL, it is not as convenient as in word. It can be formed in word and pasted to another place, such as in EXCEL.

    For example, (rú) he (Hé) (de) of (zh ō ng) in (ji ā ng) bi ǎ o (Gé) the Chinese character (zhu) to the (wéi) Spelling (p n) Sound (y n)
    -------- This is formed in word, but in word and EXCEL, Pinyin is on top of the word.

    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.