Answer the question
In order to leave comments, you need to log in
How to transcode special characters characters in python?
Good afternoon, there is a dict in which characters like
complex_consonant = {
"d̑z'": 'd͡zʲ',
"n':": 'ɲː',
"d':": 'ɟː',
"t':": 'cː'
}
How to correctly recode it into a format like {u"\u1D49" : u"\u1D49"} and then save it in the same format?
Answer the question
In order to leave comments, you need to log in
What for?
If this is the 3rd python, then everything inside it is already in Unicode. And the u"\uXXXX" format is just a text representation format.
The second one is a little more difficult - but it's better not to use the second one if you need Unicode - in the second it's a bit complicated ...
there should be no difficulties with the second python if you add imports to the beginning of the file,
all lines will become unicode
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question