EEncodingError #490
Labels
accepted
Issue has been accepted and inserted in a future milestone
need more info
open
Some team member is working on this
Milestone
{
"classname": "EEncodingError",
"detailedmessage": "",
"apperrorcode": 0,
"items": [
],
"statuscode": 500,
"reasonstring": "error",
"message": "No mapping for the Unicode character exists in the target multi-byte code page",
"data": null
}
Using ** DMVCFramework Server ** build 3.2.2 (nitrogen)
Delphi 10.4 Update1
The error arraise when trying to read string fields containing portuguese characters Ç
To reproduce just try to process that kind of data using TMVCActiveRecord
The error raise in MVCFramework.Serializer.Commons.pas
line 1132: lSStream := TStringStream.Create('', TEncoding.Unicode);
That line was changed to lSStream := TStringStream.Create('', TEncoding.ASCII);
Update:
In line 1132 remove entirely the encoding:
lSStream := TStringStream.Create('');
That assign the TMBCSEncoding class as the default encoding. More in:
http://docwiki.embarcadero.com/Libraries/Sydney/en/System.SysUtils.TMBCSEncoding
It appear to be a better solution
and the error disappear and now all working normally, but I dont know if that will have some other impact more ahead in others areas of the Framework.
Also if the problem is proved to be a bug, please pull fix in source files.
Similar errors also referenced here:
https://www.facebook.com/groups/delphimvcframework/permalink/1895046327245164/
#36
#315
But situations diferent in it owns ways
The real problem is not of DMVCFramwork, but of Embarcadero itself, as can be read here:
https://stackoverflow.com/questions/35708827/what-could-cause-no-mapping-for-the-unicode-character-exists-in-the-target-mult
The proposed solution is just a workaraound, but not the optimal one
Thanks.
The text was updated successfully, but these errors were encountered: