﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20375	Post-processing CSS file with Unicode chars fails	Bouke Haarsma	nobody	"Say I have a static file like this: (icons.css)
{{{
.icon-home:before { content: '\2302'; } /* '⌂' */
.icon-play-circle2:before { content: '\e048'; } /* '' */
.icon-location:before { content: '\e724'; } /* '' */
.icon-map:before { content: '\e727'; } /* '' */
.icon-twitter-1:before { content: '\f309'; } /* '' */
.icon-facebook-1:before { content: '\f30c'; } /* '' */
.icon-doc:before { content: '📄'; } /* '\1f4c4' */
.icon-calendar:before { content: '📅'; } /* '\1f4c5' */
.icon-search:before { content: '🔍'; } /* '\1f50d' */
}}}

When this file is being post-processed (in ``collectstatic``), an exception is raised:

{{{
Traceback (most recent call last):
  File ""/Applications/PyCharm.app/helpers/pydev/pydevd.py"", line 1481, in <module>
    debugger.run(setup['file'], None, None)
  File ""/Applications/PyCharm.app/helpers/pydev/pydevd.py"", line 1124, in run
    pydev_imports.execfile(file, globals, locals) #execute the script
  File ""/Volumes/Users/bouke/Sites/gct/manage.py"", line 10, in <module>
    execute_from_command_line(sys.argv)
  File ""lib/python2.7/site-packages/django/core/management/__init__.py"", line 443, in execute_from_command_line
    utility.execute()
  File ""lib/python2.7/site-packages/django/core/management/__init__.py"", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""lib/python2.7/site-packages/django/core/management/base.py"", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File ""lib/python2.7/site-packages/django/core/management/base.py"", line 232, in execute
    output = self.handle(*args, **options)
  File ""lib/python2.7/site-packages/django/core/management/base.py"", line 371, in handle
    return self.handle_noargs(**options)
  File ""lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py"", line 163, in handle_noargs
    collected = self.collect()
  File ""lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py"", line 120, in collect
    for original_path, processed_path, processed in processor:
  File ""lib/python2.7/site-packages/django/contrib/staticfiles/storage.py"", line 226, in post_process
    content = pattern.sub(converter, content)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 500: ordinal not in range(128)
}}}"	Bug	closed	contrib.staticfiles	dev	Normal	duplicate		yeo.eugene.oey@… joel@…	Accepted	0	1	1	1	0	0
