Skip to content

Instantly share code, notes, and snippets.

View codeslp's full-sized avatar

Brian Farish codeslp

View GitHub Profile
@codeslp
codeslp / UNICODE to ASCII python replace
Created December 22, 2022 01:20 — forked from tushortz/UNICODE to ASCII python replace
Function to replace some annoying characters
def unicodetoascii(text):
TEXT = (text.
replace('\\xe2\\x80\\x99', "'").
replace('\\xc3\\xa9', 'e').
replace('\\xe2\\x80\\x90', '-').
replace('\\xe2\\x80\\x91', '-').
replace('\\xe2\\x80\\x92', '-').
replace('\\xe2\\x80\\x93', '-').
replace('\\xe2\\x80\\x94', '-').