VSCodeNotebook icon indicating copy to clipboard operation
VSCodeNotebook copied to clipboard

encryption/decryption fail on windows with files using utf8

Open slamp opened this issue 7 years ago • 0 comments

Versions used: VSCodeNotebooK: 2.1, Windows 7, python 3.6.5

Encryption/decryption fail on Windows with files using utf8 characters. These does not happen on Linux.

> Executing task in folder VSCodeNotebook_v2.1: python manager.py <

[[ Encrypted. Enter key to unlock ]]
Enter key >
Traceback (most recent call last):
  File "manager.py", line 7, in <module>
    vscode_notebook.main()
  File "D:\VSCodeNotebook_v2.1\vscode_notebook\vscode_notebook.py", line 55, in main
    failStatus = update_file(decode, get_file_list(), key)
  File "D:\VSCodeNotebook_v2.1\vscode_notebook\cryptlib.py", line 122, in update_file
    fptr.write(newData)
  File "D:\Python\Python36-32\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2610' in position 15: character maps to <undefined>
The terminal process terminated with exit code: 1

slamp avatar May 29 '18 09:05 slamp