# BUG: File Reader mishandles UTF-8 BOM

**URL:** <https://forum.knime.com/t/bug-file-reader-mishandles-utf-8-bom/21842>\
**Category:** KNIME Analytics Platform\
**Created:** [March 19, 2020, 6:56am UTC](https://forum.knime.com/t/bug-file-reader-mishandles-utf-8-bom/21842 "2020-03-19T06:56:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandl](https://forum-cdn.knime.com/user_avatar/forum.knime.com/dandl/32/13936_2.png) [@dandl](https://forum.knime.com/u/dandl)\
**Post date:** [March 19, 2020, 6:56am UTC](https://forum.knime.com/t/bug-file-reader-mishandles-utf-8-bom/21842/1 "2020-03-19T06:56:25Z")

</div>

A file in UTF-8-BOM encoding will start with the 3 character sequence `0xEF,0xBB,0xBF`. A file reader should recognise this, skip it, and read the remainder of the file in UTF-8. See [https://en.wikipedia.org/wiki/Byte\_order\_mark](https://en.wikipedia.org/wiki/Byte_order_mark).

The Knime File Reader node does not recognise it, but appears to replace the sequence by a single NUL. The consequence for a CSV file is that the first column has a name starting with an (invisible) NUL. This is a very hard bug to track down. It took me most of a day.

Please fix!

---

<div class="post-metadata">

**Author:** ![bjoern.lohrmann](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@bjoern.lohrmann](https://forum.knime.com/u/bjoern.lohrmann)\
**Post date:** [March 26, 2020, 1:27pm UTC](https://forum.knime.com/t/bug-file-reader-mishandles-utf-8-bom/21842/2 "2020-03-26T13:27:24Z")

</div>

Hi @dandl

sorry that this issue did cost you so much time, the behavior is indeed not so good. We have opened a ticket internally. Currently we have plans anyway to release a revised version of the File Reader, which contains many bug fixes and new features. We are planning to fix the UTF8 BOM issue with the revised File Reader, which will hopefully be published with 4.2.

Best,  
Björn

---

<div class="post-metadata">

**Author:** ![dandl](https://forum-cdn.knime.com/user_avatar/forum.knime.com/dandl/32/13936_2.png) [@dandl](https://forum.knime.com/u/dandl)\
**Post date:** [March 26, 2020, 1:58pm UTC](https://forum.knime.com/t/bug-file-reader-mishandles-utf-8-bom/21842/3 "2020-03-26T13:58:21Z")

</div>

It’s software. It has bugs. Over time, hopefully less bugs. Good to hear we’re moving in the right direction.

This is probably more of a problem for Windows developers, where UTF-16, ANSI, code pages and BOM-UTF-8 are probably a lot more common. For me they are a fact of life and this is a problem I’ll be glad to do without.

I hope you’ve got tab-delimited and Excel-style quoting and 1900 dates covered too. They’re pretty common out in the (Windows) wild.

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [September 25, 2020, 1:58am UTC](https://forum.knime.com/t/bug-file-reader-mishandles-utf-8-bom/21842/4 "2020-09-25T01:58:23Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
