Skip to main content

Bug Tracker

Side navigation

#12690 closed bug (fixed)

Opened October 10, 2012 05:28AM UTC

Closed October 10, 2012 05:02PM UTC

Last modified October 18, 2013 09:11AM UTC

Minimum JS File Contains non-ASCII Charactor

Reported by: solidco2@yeah.net Owned by: dmethvin
Priority: blocker Milestone: 1.8.3
Component: core Version: 1.8.1
Keywords: Cc:
Blocked by: Blocking:
Description

The jquery.1.8.1.min.js file contains two non-ASCII charactor. This makes IE7 fail to load the script, if html-page's charset is not UTF-8 and include jquery.js without charset attribute.

for(var i = 0; i < s.length; i++){if(s.charCodeAt(i)>127) console.log(i,s.charCodeAt(i), s.charAt(i))}

result:

14587 65279 ""

14588 160 " "

Attachments (0)
Change History (5)

Changed October 10, 2012 04:26PM UTC by dmethvin comment:1

component: unfiledcore
milestone: None1.8.3
owner: → dmethvin
priority: undecidedblocker
status: newassigned

Confirmed, and also in 1.8.2. The problem seems to be that Uglify is converting the special characters in the jQuery.trim method:

... !core_trim.call("\\uFEFF\\xA0") ...

In general it seems like we might want a build step to verify there are only plain-ASCII (char code <127) characters in both the development and minified files.

Changed October 10, 2012 05:02PM UTC by Dave Methvin comment:2

resolution: → fixed
status: assignedclosed

Fix #12690. Avoid use of UTF-8 chars in final files.

Changeset: a60fed4dec85e7b0c3b6fc5741b14cee1552afc4

Changed October 23, 2012 12:26PM UTC by dmethvin comment:3

#12782 is a duplicate of this ticket.

Changed October 18, 2013 09:04AM UTC by shiwen1981@gmail.com comment:4

Dear,

We have stable code on our application with v1.8.2, but this issue happens in IE6. Is it possible to fix this issue by ourselves on current v1.8.2-min?

Changed October 18, 2013 09:11AM UTC by shiwen1981@gmail.com comment:5

Dear dmethvin,

We meet this issue on current application, but it's big risk to upgrade our jquery to 1.8.3. Could you please share any idea to fix this issue on 1.8.2-min on current version?

Thanks

shiwen1981@gmail.com

Replying to [comment:1 dmethvin]:

Confirmed, and also in 1.8.2. The problem seems to be that Uglify is converting the special characters in the jQuery.trim method:
> ... !core_trim.call("\\uFEFF\\xA0") ...
> 
In general it seems like we might want a build step to verify there are only plain-ASCII (char code <127) characters in both the development and minified files.