Bugs item #2909326, was opened at 2009-12-05 16:37 Message generated for change (Tracker Item Submitted) made by luccat You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=462816&aid=2909326&group_id=51305
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: wxJSON Group: last released version Status: Open Resolution: None Priority: 5 Private: No Submitted By: Luciano Cattani (luccat) Assigned to: Nobody/Anonymous (nobody) Summary: [wxJSON v1.1] error reading unrepresentable chars in ANSI Initial Comment: There is a bug in the wxJSONReader::ConvertCharByChar() function causing the last character of a UTF-8 string value to be ignored. This only happens when the reader reads a UTF-8 string that contains characters that cannot be represented in the current locale so a char-by-char conversion takes place. For example, if you read the following UTF-8 stream in ANSI mode (localized in a ISO-8859-1 environment): [ "abcABC", // US-ASCII "àèì©®", // latin-1 "αβγδ", // greek "ФХЦЧ" // cyrillic ] You get the following JSON value object: [ "abcABC", "àèì©®", "\u03B1\u03B2\u03B3", "\u0424\u0425\u0426" ] As you can see, only the first three chars are read for greek and cyrillic. The fourth char was discarded. Note that the bug only happens in ANSI mode and only when the string contains unrepresentable chars. Luciano ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=462816&aid=2909326&group_id=51305 ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ wxCode-users mailing list wxCode-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxcode-users