Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top