I can think of a couple other ways to implement this:
- move the conversion to write_content/get_content so that all uses of util.file will get the conversion, which would cover more ground (e.g., receipts) but require more testing.
- instead of using nsIScriptableUnicodeConverter in get_object/write_object, convert the non-ASCII characters to Unicode escape sequences after producing the JSON.
A patch is available at the tip of the user/gmcharlt/ lp1641208_ unmangle_ utf8_in_ utl_file branch in the working/Evergreen repository:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ gmcharlt/ lp1641208_ unmangle_ utf8_in_ utl_file
I can think of a couple other ways to implement this:
- move the conversion to write_content/ get_content so that all uses of util.file will get the conversion, which would cover more ground (e.g., receipts) but require more testing. icodeConverter in get_object/ write_object, convert the non-ASCII characters to Unicode escape sequences after producing the JSON.
- instead of using nsIScriptableUn