TextDecoder should ignore byte-order-mark like other browsers and spec
Created attachment 407831 [details] Patch
Is this a dupe of bug 169858 or a dupe of bug 203832? Both, I guess.
*** Bug 169858 has been marked as a duplicate of this bug. ***
*** Bug 203832 has been marked as a duplicate of this bug. ***
Created attachment 407864 [details] Patch
Comment on attachment 407864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407864&action=review > Source/WebCore/dom/TextDecoder.cpp:72 > + if (stream && length < bytesNeededForFullBOMIgnoreCheck()) > + return WaitForMoreBOMBytes::Yes; I also need to check if the bytes start with what may become a byte order mark here. If they're other bytes, I need to return WaitForMoreBOMBytes::No
Comment on attachment 407864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407864&action=review >> Source/WebCore/dom/TextDecoder.cpp:72 >> + return WaitForMoreBOMBytes::Yes; > > I also need to check if the bytes start with what may become a byte order mark here. If they're other bytes, I need to return WaitForMoreBOMBytes::No I guess the function would have a name like isBOMPrefix.
http://trac.webkit.org/r266528
<rdar://problem/68285403>