pajowu / signal-backup-decode

Decode Signal Backups
GNU General Public License v3.0
212 stars 17 forks source link

Encoding errors #54

Closed larrachecoeur closed 1 year ago

larrachecoeur commented 1 year ago

I am getting lots of encoding errors

e.g.

class IncrementalEncoder(codecs.IncrementalEncoder): │ │ 18 │ def encode(self, input, final=False): │ │ > 19 │ │ return codecs.charmap_encode(input,self.errors,encoding_table)[0] │ │ 20 │ │ 21 class IncrementalDecoder(codecs.IncrementalDecoder): │ │ 22 │ def decode(self, input, final=False): │ │ │ │ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │ │ │ final = False │ │ │ │ input = "[2022-07-19 15:25] Me: Et si tu n′existais pas\r\nDis-moi pourquoi │ │ │ │ j'existerais\r\nP"+73 │ │ │ │ self = <encodings.cp1252.IncrementalEncoder object at 0x000002942D3CAB00> │ │ │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │ └──────────────────────────────────────────────────────────────────────────────────────────────────┘ UnicodeEncodeError: 'charmap' codec can't encode character '\u2032' in position 33: character maps to <undefined>

larrachecoeur commented 1 year ago

chars with accents will not be mapped correctly, too. even their do not initiate an exception

�tre seul cet apr�s-midi

pajowu commented 1 year ago

Did you find a solution? If yes, could you write a short message what you did to solve it, so other users know what to do