Norod78

Read FB dump file and convert to UTF8

May 8th, 2023 (edited)
998
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. text = open('your_posts_1.json', 'r').read()
  2. result = text.encode('latin-1').decode('raw_unicode_escape').encode('latin-1').decode('utf-8')
  3. f = open('your_posts_1_utf8.json', 'w')
  4. f.write(result)
  5. f.close()
Tags: Hebrew
Advertisement
Add Comment
Please, Sign In to add comment