Opened 12 years ago
Closed 12 years ago
#4314 closed Bugs (fixed)
write_json() create_escapes()
Reported by: | Owned by: | Sebastian Redl | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | property_tree |
Version: | Boost 1.42.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Bad handling of escaping:
From an std::string, *b is a char (not unsigned char).
unsigned long u = (std::min)(static_cast<unsigned long>(*b), 0xFFFFul);
This line converts all chars with a negative value to 0xFFFFul.
On Mac OSX 10.6 there is a problem with std::locale, it cannot be changed to something else than 'C'. The strings I added in my ptree are already UTF-8 encoded.
All french accents become uFFFF\uFFFF with write_json() while they are written fine with write_xml().
Note:
See TracTickets
for help on using tickets.
Fixed on trunk and release. Code now first casts to unsigned char.