Atitit. Code for judging Chinese characters REG_SZ in regedit registry

Source: Internet
Author: User

Atitit. Judging the encoding of Chinese characters regedit inside the Registry REG_SZ

1 . can be judged by Unicode encoding 1

2 . have the following split UCS2 big head thief code 1

3 . use thief code test 1

4 . REG_DWORD read inside the registry 2

1. can be judged by Unicode encoding

byte[] AI={ -, 103, Wuyi, 0, Wuyi, 0,  the, 0};

byte[] A2="Ben".getBytes("Unicode");

[-2,-1, 103, 44]

can be judged to be Unicode encoding

2. have the following split UCS2 big head thief code

java UCS2 encoding 2014-08-28 21:06:00

Category: Java

byte[] arr = deliver.getmessagecontent (). GetBytes ();

String content = new String (arr, "unicodebigunmarked");

Author :: ★ (Attilax) >>>    nickname : old-Wow paw   (   full name:: ATTILAX AKBAR AL RAPANUI&NBSP, Attilax &NBSP, " "  Al   Rapa Nui &NBSP,   Kanji name: Ayron, Email:[email protected]

reprint Please indicate source: http://www.cnblogs.com/attilax/

3. use thief code test

byte[] AI={ -, 103, Wuyi, 0, Wuyi, 0,  the, 0};

System. out.println( New String(AI,"unicodelittleunmarked")  );

Results OK

4. REG_DWORD read inside the registry

byte[]==== [-2,-1, 103,]

Main data the first array inside ... ret byte[0] go OK lan .

Atitit. Code for judging Chinese characters REG_SZ in regedit registry

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.