Example of socket communication with UTF-8 encoding for Delphi and Java

Source: Internet
Author: User

Recent Projects (Delphi development) require frequent data interaction with systems developed by the Java language (socket communication method), and data encoding conventions using UTF-8 encoding.

I do not have the words: the Java system reflects that the data they received the Delphi is garbled, and my Side (Delphi7,ansi) received the data will utf-8 transcoding into ANSI is garbled.

Because I'm not familiar with the Java language, I've also wondered if Delphi's Utf-8 code is different from the Java language.

Recently learned a bit about Java knowledge, write a small program to test and verify my suspicions.

It turns out that Delphi7 's UTF-8 code is consistent with Java's UTF-8 encoding.

Example of socket communication with UTF-8 encoding for Delphi and Java

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.