is the binary of the same letter the same in all languages?

Source: Internet
Author: User
Tags php language
In PHP language, the string "ABCDE" is processed into binary, read and processed in other languages (such as Go,c), can you get ABCDE?

Reply content:

In PHP language, the string "ABCDE" is processed into binary, read and processed in other languages (such as Go,c), can you get ABCDE?

The character encoding is used to ensure that the double reads are consistent. As long as the same character encoding is used, they can read each other's characters.

Sure you can, as long as your character code is unified, there will be no problem.
If not, the programming language has been a mess for a long time.

"How do you handle thestring" ABCDE "into binary" in PHP language ? Don't talk about logic, show us code.

Computers are binary, and they are not language-sensitive.

Encode, decode the format to ensure consistency on the line

First, the text does not have special treatment, he is in the binary system.
And which letter corresponds to which binary number, and programming language does not matter, are the character set definition, as long as the use of the same character set, regardless of which language read and write is not garbled .

In most cases, even if the code is different, English characters are not garbled . Almost the majority of the character sets contain ASCII-compatible code.

  • 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.