enter the code here I am trying to delete the accents of a string I get when decrypting, looking in Google I found that to remove accents the unicodedata.normalize('NFD', string)
method is used but when using it does not delete the accents, the code I have is the following:
import unicodedata
import gnupg
path = 'ruta del archivo encriptado'
gpg = gnupg.GPG(gpghome='~/.gnupg')
data = gpg.decrypt_file(open(path, 'rb'))
data = unicodedata.normalize('NFD', str(data))
When I print the data variable I get the following:
print(data)
>>> Roman González
The encrypted file is a JSON that contains the following:
{
"name": "Roman González"
}