Bug#964901: UTF-8 BOM can be moved while editing

2020-07-18 Thread Nils König
On Sat, Jul 18, 2020 at 18:53:34 +0200, Benno Schulenberg wrote: > > Op 13-07-2020 om 01:56 schreef Nils König: > > Basically, I imagined this just like: > > > >> If nano were to handle a BOM properly, it must remove a BOM whenever > >> a file is read, and add it back when it is written. But

Bug#964901: UTF-8 BOM can be moved while editing

2020-07-18 Thread Benno Schulenberg
Op 13-07-2020 om 01:56 schreef Nils König: > Basically, I imagined this just like: > >> If nano were to handle a BOM properly, it must remove a BOM whenever >> a file is read, and add it back when it is written. But that would >> make it impossible to delete an unwanted BOM with a simple

Bug#964901: UTF-8 BOM can be moved while editing

2020-07-12 Thread Nils König
On Sun, Jul 12, 2020 at 20:04:31 +0200, Benno Schulenberg wrote: > Op 12-07-2020 om 16:26 schreef Nils König: > > FWIW I would have expected leading BOM/NoBOM to be an option when saving > > with > > ^O (like DOS/Mac-Format) and by default keep status quo. > > No-no-no, horrible! The user

Bug#964901: UTF-8 BOM can be moved while editing

2020-07-12 Thread Benno Schulenberg
Op 12-07-2020 om 16:26 schreef Nils König: > I agree, that a UTF8-BOM is usually not necessary. In UTF-8 a BOM is never necessary. It's just that the annoying fools at Microsoft have made their software so that things don't work when there is *no* BOM. Christ... how stupid can they be? > With

Bug#964901: UTF-8 BOM can be moved while editing

2020-07-12 Thread Nils König
Hello Benno, thanks for your quick reply. On Sun, Jul 12, 2020 at 13:15:41 +0200, Benno Schulenberg wrote: > Ideally, a UTF-8 file should not contain a Byte Order Mark. What if > I concatenate several files together? Then the result might contain > BOMs embedded in the text. > > As far as I

Bug#964901: UTF-8 BOM can be moved while editing

2020-07-12 Thread Benno Schulenberg
Hello Nils, Op 11-07-2020 om 21:56 schreef Nils König: > when editing a UTF8 file in nano that contains a BOM (efbbbf) and inserting a > character at the beginning, the BOM bytes will move after the inserted > character. This can lead to breakages when such a file is being parsed by a >

Bug#964901: UTF-8 BOM can be moved while editing

2020-07-11 Thread Nils König
Package: nano Version: 3.2-3 Severity: normal Dear Maintainer, when editing a UTF8 file in nano that contains a BOM (efbbbf) and inserting a character at the beginning, the BOM bytes will move after the inserted character. This can lead to breakages when such a file is being parsed by a