Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Encoding problem?
#7
(11-03-2024, 09:54 PM)Justin Case Wrote: I create my client objects with a TIdEncoderMime component so that they can base64 encode strings from a TStringList.Text property (deals with all the carriage returns etc so i can send it all in one line) but now the ¦ characters are also going to question marks and your workaround doesn't seem to work with EncodeString() which has two paramters after the input string for the encoding.

Those parameters work the same way as the IOHandler properties. The ASrcEncoding parameter is used to convert the AnsiString to Unicode, and the AByteEncoding parameter is used to convert the Unicode to bytes, which are then encoded to base64. So you have to make sure the encodings match your situation. In this case, the default ASrcEncoding is OSDefault, and the default AByteEncoding is ASCII, which is why you are losing the ¦ character. So you just need to pick a more suitable byte encoding which supports that character.

(11-03-2024, 09:54 PM)Justin Case Wrote: I'm not opposed to a completely different delimiter character if you can suggest a good one that simply works ..

I already addressed that in my very first reply of this discussion.

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)