GNU nano - Bugs: bug #39895, [Request] show a message when file...
You are not allowed to post comments on this tracker with your current authentication level.
bug #39895: [Request] show a message when file contains bytes invalid in current encoding
Submitter: | None | ||
Submitted: | Thu 29 Aug 2013 09:41:21 PM UTC | ||
Severity: | 3 - Normal | Status: | Wont Fix |
Assigned to: | None | Open/Closed: | Closed |
Tue 24 Sep 2013 11:31:34 AM UTC, comment #4: |
Benno Schulenberg <bens> |
Mon 23 Sep 2013 06:30:41 PM UTC, comment #3: Additional information.
|
Anonymous |
Mon 23 Sep 2013 06:11:17 PM UTC, comment #2: Thank you for posting a proposed fix. I suppose that will work, but I imagine a lot of non-technical people are going to run into this and say, "nano doesn't support utf8 correctly!!!!" -- when in fact, it does.
|
Anonymous |
Fri 13 Sep 2013 11:34:59 AM UTC, comment #1: Have you tried starting nano with an ISO-8859-1 locale (instead of your apparent default UTF-8 locale)?
|
Benno Schulenberg <bens> |
Thu 29 Aug 2013 09:41:21 PM UTC, original submission:
I have a file called stuff.js
|
Anonymous |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-02-24 | bens | Status | None | Wont Fix | |
Open/Closed | Open | Closed | |||
2014-06-14 | bens | Summary | [request] show a message when file contains bytes invalid in current encoding | [Request] show a message when file contains bytes invalid in current encoding | |
2014-06-13 | bens | Summary | iso 8859 | [request] show a message when file contains bytes invalid in current encoding |
Powered by Savane 3.13-d3ae.
Corresponding source code
Hmm, I think very few non-technical people will be using nano. And if they do, they won't even know what utf-8 is, or iso-8859. So they will most probably think that the file contains some "crap", was corrupted, damaged, and will likely refrain from touching it.
The "workaround" that I proposed does indeed work. By default my system had only utf8 locales installed, so I could not test it. But I've created some iso-8859-1 locales now, and nano still shows those questioning diamonds. Only when also changing the encoding of the terminal and then starting nano in the 8859 locale do the proper characters show up. So... for those who work completely in an ISO-8859-* environment, nano will function fine. Those who work with mixed encodings should know what they are doing.
Sure, it would be nice if nano would show a message when the file contains invalid UTF-8 (when the locale is UTF-8). But... are you willing to provide a patch? :)
But it is a dying problem -- soon no one will be using anything else any more but UTF-8. Even the page you quoted suggests so: "The best way to deal with encoding issues [...] is to serve all your pages in UTF-8."