[ruby-core:93024] [Ruby trunk Bug#15908] Detecting BOM with non-UTF encoding

From: nobu@...
Date: 2019-06-08 12:44:46 UTC
List: ruby-core #93024
Issue #15908 has been reported by nobu (Nobuyoshi Nakada).

----------------------------------------
Bug #15908: Detecting BOM with non-UTF encoding
https://bugs.ruby-lang.org/issues/15908

* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Currently, "bom|" encoding prefix to `File.open` is ignored if the encoding name is not a UTF.
But one usage of BOM is to tell if the stream is a UTF or not, and especially common on Windows, e.g. UTF-16LE or OEMCP.
So I think this restriction should be removed.

---Files--------------------------------
0001-Enable-BOM-detection-with-non-UTF-encodings.patch (4.27 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next