Open BluuArc opened 5 years ago
The text in the image was originally Mathew (매튜) Kim
looks like it's somewhere in the python code the issue front end displays it normally
Can confirm that it seems that it might by something on Python's side.
This is the response from the endpoint for that entry.
{
"description": "",
"github": "",
"graduating_semester": "",
"image": "",
"join_date": "",
"name": "Mathew (\u00eb\u00a7\u00a4\u00ed\u0160\u0153) Kim",
"personal_site": "",
"position": "Secretary",
"slack": "",
"special_ability": "",
"term_end": "SPRING_2017",
"term_start": "SUMMER_2016"
}
Decoding the unicode in the name
field becomes Mathew (매튜) Kim
.
On the other hand, changing the name manually to Mathew (매튜) Kim
on the frontend via a simple "Inspect Element" edit results in what we expected.
Cant you simply declare the encoding in the python header?
#-*- encoding: utf-8 -*-
Or maybe this can be solved by using configuration handling to force utf-8:
JSON_AS_ASCII=false
From the Flask documentation:
By default Flask serialize object to ascii-encoded JSON. If this is set to False Flask will not encode to ASCII and output strings as-is and return unicode strings. jsonify will automatically encode it in utf-8 then for transport for instance.
Some characters look weird on some devices