evpo / EncryptPad

Minimalist secure text editor and binary encryptor that implements RFC 4880 Open PGP format: symmetrically encrypted, compressed and integrity protected. The editor can protect files with passwords, key files or both.
https://evpo.net/encryptpad
Other
433 stars 64 forks source link

Bug: Encryptpad removes non-breaking spaces in the plain text file, replacing them with white spaces (in the output file) #137

Open Bricklam opened 2 months ago

Bricklam commented 2 months ago

I used Encryptpad to open & encrypt a text file (with many unicode characters) as gpg, but later when I decrypted the file back to plain text, I noticed it is size is different than the original file, when I inspected the content: I found that all non-breaking space characters (included in the original file) were gone and replaced by white space characters, indicating that (Encryptpad) editor cannot handle/save non-breaking space characters. Note: that this problem doesn't appear when encrypting the same text file without opening it in Encryptpad, by using (File > File Encryption) feature, but only if the file was opened & encrypted inside the application.

Note: here I uploaded a sample text file with non-breaking space characters if you want to test it, you can easily view non-breaking space characters by opening the file in (Sublime Text), it appears as: "<0xa0>". sample_text.txt

Bricklam commented 2 months ago

I also noticed another minor bug: the edit files get changed when pressing the keys: (Ctrl+Shift), although they don't shouldn't cause any modifications (since no editing is done), you can verify that by noticing the file modification character (*), appears in the top bar when the file is edited, once (Ctrl+Shift) were pressed together, indicating a file modification

anyway, I want to thank you for your work on this promising project.