How to display non-English language gotten by Facebook API
<p>I'm getting some facebook posts that have a mixture of English and and a non-English language (Khmer to be exact). </p>

<p>Here's how the non-English is displayed when I print the data to screen or save it to file: \u178a\u17c2\u179b\u1787\u17b6\u17a2\u17d2. I would rather have it display as áá¹á ááááááá (Note: this is not a translation of the previous unicode.)</p>

<p>In pycharm I added:</p>

<ol>
<li><p>(at top) # -<em>- coding: utf-8 -</em>-</p></li>
<li><p>import sys
reload(sys)
sys.setdefaultencoding('utf8')</p></li>
<li>s = json.dumps(posts['data'],ensure_ascii=False)</li>
<li>json_file.write(s.decode('utf-8'))</li>
</ol>

python facebook facebook-graph-api translation