I am streaming arabic tweets that are stored as a ".jsonl" file. When opening the file in Xcode, Brackets or textEdit the arabic characters are shown as "\u0645\u0635\u0631: \u0625\u0646\u0647\u0627\u0621 \u0628\u0639\u0636 \u0627\u0644". But in order to analyse the content, I would need the files to be read correctly displaying the actual arabic text. I've managed to print them in the Python(3) console, but I still need them in a separate file. I feel like this is a pretty simple thing to do, but when using io.open etc I always run into problems. Appreciative for any ideas!
This is the code that worked for me to print them in the python console:
import json
outFile = open('user_timeline_almanarnews.jsonl', 'r').read()
splitFile = outFile.split('\n')
for eachLine in splitFile:
x = eachLine.encode('utf-8')
print(x.decode('unicode-escape'))