Tôi đã làm theo cách này:
POLISH_CHARACTERS = {
50309:'a',50311:'c',50329:'e',50562:'l',50564:'n',50099:'o',50587:'s',50618:'z',50620:'z',
50308:'A',50310:'C',50328:'E',50561:'L',50563:'N',50067:'O',50586:'S',50617:'Z',50619:'Z',}
def encodePL[text]:
nrmtxt = unicodedata.normalize['NFC',text]
i = 0
ret_str = []
while i < len[nrmtxt]:
if ord[text[i]]>128: # non ASCII character
fbyte = ord[text[i]]
sbyte = ord[text[i+1]]
lkey = [fbyte