[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-develop
Subject:    [HtmlUnit] [htmlunit:bugs] #1722 javascript.tools.SourceReader only skips the UTF-16BE BOM
From:       "Ahmed Ashour" <asashour () users ! sf ! net>
Date:       2015-09-29 22:41:43
Message-ID: /p/htmlunit/bugs/1722/7fa39af8627a30b981a5a956ef77a4beb44bceaa.bugs () htmlunit ! p ! sourceforge ! net
[Download RAW message or body]

[Attachment #2 (multipart/related)]


--===============5969018574343004705==
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi, can you provide a test case?


---

** [bugs:#1722] javascript.tools.SourceReader only skips the UTF-16BE BOM**

**Status:** open
**Group:** 2.18
**Created:** Tue Sep 29, 2015 10:31 PM UTC by Sam Smoot
**Last Updated:** Tue Sep 29, 2015 10:31 PM UTC
**Owner:** nobody


I'm trying to getPage for a page that references a Javascript source with a UTF-8 \
BOM.

The correct encoding is being used, but SourceReader only skips the BOM for UTF-16BE \
sources so I get a ScriptException: illegal character.

See: http://grepcode.com/file/repo1.maven.org/maven2/net.sourceforge.htmlunit/htmlunit \
-core-js/2.17/net/sourceforge/htmlunit/corejs/javascript/tools/SourceReader.java?av=f#123


The UTF-16BE BOM is hard-coded. That's only going to work for one of the five UTF \
encodings supported by the if() statement just above it.


---

Sent from sourceforge.net because htmlunit-develop@lists.sourceforge.net is \
subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at \
https://sourceforge.net/p/htmlunit/admin/bugs/options.  Or, if this is a mailing \
                list, you can unsubscribe from the mailing list.
--===============5969018574343004705==
MIME-Version: 1.0
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: 7bit

<div class="markdown_content"><p>Hi, can you provide a test case?</p>
<hr/>
<p><strong> <a class="alink" \
href="http://sourceforge.net/p/htmlunit/bugs/1722/">[bugs:#1722]</a> \
javascript.tools.SourceReader only skips the UTF-16BE BOM</strong></p> \
<p><strong>Status:</strong> open<br/> <strong>Group:</strong> 2.18<br/>
<strong>Created:</strong> Tue Sep 29, 2015 10:31 PM UTC by Sam Smoot<br/>
<strong>Last Updated:</strong> Tue Sep 29, 2015 10:31 PM UTC<br/>
<strong>Owner:</strong> nobody</p>
<p>I'm trying to getPage for a page that references a Javascript source with a UTF-8 \
BOM.</p> <p>The correct encoding is being used, but SourceReader only skips the BOM \
for UTF-16BE sources so I get a ScriptException: illegal character.</p> <p>See: <a \
href="http://grepcode.com/file/repo1.maven.org/maven2/net.sourceforge.htmlunit/htmluni \
t-core-js/2.17/net/sourceforge/htmlunit/corejs/javascript/tools/SourceReader.java?av=f#123" \
rel="nofollow">http://grepcode.com/file/repo1.maven.org/maven2/net.sourceforge.htmluni \
t/htmlunit-core-js/2.17/net/sourceforge/htmlunit/corejs/javascript/tools/SourceReader.java?av=f#123</a></p>
 <p>The UTF-16BE BOM is hard-coded. That's only going to work for one of the five UTF \
encodings supported by the if() statement just above it.</p> <hr/>
<p>Sent from sourceforge.net because htmlunit-develop@lists.sourceforge.net is \
subscribed to <a href="https://sourceforge.net/p/htmlunit/bugs/">https://sourceforge.net/p/htmlunit/bugs/</a></p>
 <p>To unsubscribe from further messages, a project admin can change settings at <a \
href="https://sourceforge.net/p/htmlunit/admin/bugs/options.">https://sourceforge.net/p/htmlunit/admin/bugs/options.</a> \
                Or, if this is a mailing list, you can unsubscribe from the mailing \
                list.</p></div>
--===============5969018574343004705==--



------------------------------------------------------------------------------


_______________________________________________
HtmlUnit-develop mailing list
HtmlUnit-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic