简体   繁体   中英

Indy10 Readln and ByteEncoding

I would like to use AContext.Connection.IOHandler.ReadLn in Indy10 on my IdTcpServer but I don't know how to use the ByteEncoding Parameter. Does the client have to send a WideString or AnsiString?

If you are in control of both the client and server code, then you decide what specific encoding the client sends the text as (UTF-8 is a good choice), and then code the server accordingly. Indy defaults to ASCII, but you can change that. However, if you are not in control of the client code, then you need to find out what encoding the client is actually using so that you can then code the server accordingly. Don't just make blind assumptions. Find out what is actually being used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM