Created
March 1, 2016 11:38
-
-
Save guelfoweb/1b7c4ecc3a2a7d8947ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| filename = 'SCAN000189077.js' | |
| with open(filename, 'r') as file: | |
| data = file.read().split('\n') | |
| for str in data: | |
| uMatch = re.findall('\\\u[0-9]{3}[0-9a-fA-F]{1}', str) | |
| for u in uMatch: | |
| str = str.replace(u, u.decode('unicode-escape')) | |
| print (str) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment