Bug Tracker

Ticket #12690 (closed bug: fixed)

Opened 2 years ago

Last modified 14 months ago

Minimum JS File Contains non-ASCII Charactor

Reported by: solidco2@… Owned by: dmethvin
Priority: blocker Milestone: 1.8.3
Component: core Version: 1.8.1
Keywords: Cc:
Blocking: Blocked by:

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 " "

Change History

comment:1 follow-up: ↓ 5 Changed 2 years ago by dmethvin

  • Owner set to dmethvin
  • Priority changed from undecided to blocker
  • Status changed from new to assigned
  • Component changed from unfiled to core
  • Milestone changed from None to 1.8.3

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.

comment:2 Changed 2 years ago by Dave Methvin

  • Status changed from assigned to closed
  • Resolution set to fixed

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

Changeset: a60fed4dec85e7b0c3b6fc5741b14cee1552afc4

comment:3 Changed 2 years ago by dmethvin

#12782 is a duplicate of this ticket.

comment:4 Changed 14 months ago by shiwen1981@…

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?

comment:5 in reply to: ↑ 1 Changed 14 months ago by shiwen1981@…

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@…

Replying to 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.

Note: See TracTickets for help on using tickets.