[Textual Research] the principle of "hot and hot" and "Hot and thin copy"

Source: Internet
Author: User

On the programmer's website, I often see a paragraph (full of tears)

Hand-held two copy, mouth burst hot.

Explain why these two items are not equal to =:

Garbled Chunk:

This is due to the conversion problem between the GBK character set and the Unicode Character Set. There must be some characters in the conversion process of Unicode and the old encoding system, which cannot be expressed by Unicode. Unicode officially uses a placeholder to represent these words, which is: U + fffd replacement character. Then the U + fffd UTF-8 code out, exactly is '\ XeF \ xbf \ xbd '. If '\ XeF \ xbf \ xbd' is repeated multiple times, for example, '\ XeF \ xbf \ xbd ', then, if it is displayed in the GBK/cp936/gb2312/gb18030 environment, a Chinese character contains two bytes, and the final result is: Weight-weight (0 xefbf), kg (0 xbdef ), copy (0 xbfbd ).

Hot and hot garbled code:

On Windows, the MS Compiler (that is, the one with VC) in debug mode fills all uninitialized stack memory into 0xcc, in the string, the heap memory is filled with 0xcd. In the string, the heap memory is changed to 0xcd ". That is to say, there is hot and hot. Check the initialization...




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.