Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unicode Character
#2
(06-12-2018, 05:21 PM)joelcc Wrote: I need help with the following error:  No mapping for the Unicode character exists in the target multi-byte code page

I do not use IntraWeb, but it is clear from the stack trace that the error is coming from the TStringStream.DataString property getter. Chances are, the TStringStream was most likely constructed with a SysUtils.TEncoding object that does not match the real encoding of the bytes that are in the stream. For instance, if the stream were constructed with TEncoding.UTF8, but the bytes are not encoded in UTF-8. TStringStream does not allow its TEncoding to be changed after construction, so the creator has to get the encoding correct up front, and that can sometimes be difficult to do, especially if the encoding is not known until after the stream is populated. That is why I rarely ever use TStringStream in Delphi 2009+.

Reply


Messages In This Thread
Unicode Character - by joelcc - 06-12-2018, 05:21 PM
RE: Unicode Character - by rlebeau - 06-12-2018, 05:36 PM
RE: Unicode Character - by Alexandre Machado - 06-12-2018, 11:56 PM
RE: Unicode Character - by joelcc - 06-12-2018, 05:51 PM
RE: Unicode Character - by rlebeau - 06-12-2018, 08:41 PM
RE: Unicode Character - by Jose Nilton Pace - 06-12-2018, 09:03 PM
RE: Unicode Character - by joelcc - 06-12-2018, 09:27 PM
RE: Unicode Character - by Alexandre Machado - 06-12-2018, 11:59 PM
RE: Unicode Character - by joel - 06-13-2018, 03:55 AM
RE: Unicode Character - by joelcc - 06-13-2018, 06:48 PM
RE: Unicode Character - by Mirco - 06-28-2018, 09:29 AM
RE: Unicode Character - by joelcc - 06-28-2018, 01:08 PM
RE: Unicode Character - by Mirco - 06-28-2018, 02:09 PM
RE: Unicode Character - by joelcc - 06-28-2018, 03:15 PM
RE: Unicode Character - by Mirco - 06-29-2018, 06:50 AM
RE: Unicode Character - by joelcc - 06-29-2018, 02:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)