httpclient icon indicating copy to clipboard operation
httpclient copied to clipboard

How to handle content with encoding UTF-16 with BOM present?

Open PikachuEXE opened this issue 6 years ago • 0 comments

I am using this library to download remote text files Some of them contains content with UTF-16LE (instead of usual UTF-8) with BOM (\xff\xfe) And directly handling the downloaded content would causes error reported in https://bugs.ruby-lang.org/issues/16402

Is there a way in this library to handle the encoding/BOM issue properly? (Without resorting to write to temp file and read again with different mode)

PikachuEXE avatar Dec 09 '19 02:12 PikachuEXE