cgutierrez/JsMinifier — Issue #7: Unicode Error
Author: jfreyre
Created: 2012-02-27 09:27:56+00:00
State: open

Hi,

I am a french speaker and when I try to minify my files, I get an error about accentued chars like 'à' or 'é'

Here is the exception thrown in the console:

Exception in thread Thread-29:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "./compilers/basecall.py", line 22, in run
File "./compilers/googleclosurecall.py", line 12, in exec_request
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 1281, in urlencode
v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 188: ordinal not in range(128)

error: There was an error minifying the Javascript.
Warning: Double finish

And a sample of script that fail:

$(document).ready(function () {
$('div').append('à')
});

Hope it helps... ;)