Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Encoding problem?
#2
(10-27-2024, 08:27 PM)Justin Case Wrote: My Client is failing to logon to my server now and I think this is an upgrade woe (I'm using 10.6.3.3)


What version are you upgrading from?

(10-27-2024, 08:27 PM)Justin Case Wrote: The client sends a string command like this: logon¦<username>¦password


Why is the client using a non-ASCII character as a token separator? What version of Delphi (or other programming language) is the client using?

The ASCII pipe character is | (124, $7C). ¦ (166, $AC) is outside of ASCII and thus subject to charset interpretation.

(10-27-2024, 08:27 PM)Justin Case Wrote: After being stumped as to it not working anymore, I ended up doing a debug and seeing that the clients TCP thread is sending it but the server isn't happy - and sends back a 400 quoting it with ? instead of ¦


That means you have a charset mismatch between the client and server. Indy's default charset is ASCII. Clearly the client is not sending ASCII. So, what charset is it actually using? Looks like Windows-1252 or similar. You will need to match that charset on the server, ie by setting the AContext.Connection.IOHandler.DefStringEncoding property in the server's OnConnect event

(10-27-2024, 08:27 PM)Justin Case Wrote: This never used to happen. Why does it happen now?

Indy 10 has always behaved this way since Delphi migrated to Unicode in 2009.

Reply


Messages In This Thread
Encoding problem? - by Justin Case - 10-27-2024, 08:27 PM
RE: Encoding problem? - by rlebeau - 10-27-2024, 09:39 PM
RE: Encoding problem? - by Justin Case - 10-27-2024, 09:57 PM
RE: Encoding problem? - by rlebeau - 10-28-2024, 02:35 AM
RE: Encoding problem? - by Justin Case - 10-28-2024, 09:53 AM
RE: Encoding problem? - by Justin Case - 11-03-2024, 09:54 PM
RE: Encoding problem? - by rlebeau - 11-04-2024, 04:39 AM
RE: Encoding problem? - by Justin Case - 11-04-2024, 09:22 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)