Modify ↓
Ticket #12690 (closed bug: fixed)
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 Changed 7 months 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
comment:2 Changed 7 months 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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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.