Skip to content

No mapping for the Unicode character exists in the target multi byte code page

Mobius One edited this page Apr 19, 2022 · 3 revisions

No mapping for the Unicode character exists in the target multi-byte code page

Famoso erro dos Delphis novos referentes a acentuação de strings. As formas existentes para resolver o problema são:

  • Utilizar escape_chars(string) no servidor antes de devolver o Result pro cliente e, no cliente, utilizar unescape_chars(string) pra decodificar o texto.
  • Ao usar seu JSONObject, JSONArray ou JSONValue, capturar o texto dele como .ToJSON no servidor e no cliente e não como .ToString.
  • Converter o texto pra UTF8 com o TEncoding.UTF8 no servidor e no cliente usar UTF8Decode(string).
Clone this wiki locally