BUG when reloading changed file with diff encoding
-
Hi,
I was just using notepad to monitor some text output from one of my c# programs and noticed that, when the file gets rewritten with a different encoding, notepad prompts me to reload the file but does not change the encoding which makes the displayed text a proper mess.
I was actually swearing at my program LOL until I noticed that if I close notepad and then reopen the file everything looks fine. -
Practice some modesty/caution before calling specific behavior a BUG.
Files do NOT have encoding.
Encoding is applied to the file’s byte stream when it is loaded into a buffer within Scintilla.
On load, an automatic detection algorithm is used to select an encoding. Many threads in this forum state a wish for an option to override this automatic selection.
After load the user can override the encoding.The question of whether file reload should re-trigger the automatic detection or not is an open user interface decision with no ONE RIGHT ANSWER.
Since the scenario you described of a file changing its contents in the background in away that will trigger different encoding result from the automatic detection apply to 0.001% of Notepad++ users I think that maintaining the current encoding of the buffer is the choice that benefit the majority of users.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login