Use json.dumps() with ensure_ascii=False

Bug #1031211 reported by Jason Gerard DeRose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Microfiber
Fix Released
Critical
Jason Gerard DeRose

Bug Description

Well, this is a bit embarrassing. Thinking that Python3 is super safe when it comes to character encodings, I haven't bothered to add any non-ascii test values yet. That was a mistake.

json.dumps() has a bad, very un-Python3-like default of ensure_ascii=True, which means you get this:

>>> json.dumps('™')
'"\\u2122"'

When you want this:

>>> json.dumps('™', ensure_ascii=False)
'"™"'

This bug is to track the fix.

Related branches

Changed in microfiber:
status: In Progress → Fix Committed
Changed in microfiber:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.