From: duerst@... Date: 2019-08-30T08:07:14+00:00 Subject: [ruby-core:94680] [Ruby master Bug#15908] Detecting BOM with non-UTF encoding Issue #15908 has been updated by duerst (Martin D�rst). nobu (Nobuyoshi Nakada) wrote: > I thought UTF-16LE and CP932 as the main purpose however, I'm bit surprised that these texts have been extinct on Windows already. :tada: They are not yet extinct, unfortunately :-(. In Japan, there may be quite a few cases where this would work, but even in Japan, there are many other cases where a larger and/or different selection of encodings is needed. ---------------------------------------- Bug #15908: Detecting BOM with non-UTF encoding https://bugs.ruby-lang.org/issues/15908#change-81286 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * 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: