changcheng / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

Ability to specify file.encoding in ConfigurableWroFilter #208

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Ran into a strange issue where a developer on one machine was having utf-8 
characters not show up properly from javascript and css files processed through 
wro4j (though the files were served fine through apache or spring mvc resource 
servlet).
Tried using @charset "utf-8"; at the top of the affected CSS files but it seems 
to make no difference to wro4j.
Finally discovered that wro4j was obeying a different file-encoding (even 
though the system variable LANG=en_US.UTF-8)

For CSS and JS there's not a great way to identify the encoding in the file 
itself (unlike jsps and xml), so I propose allowing a config setting and 
forcing the encoding on the read of the css and js files from disk in the code 
itself (since letting java do whatever it wants seems to be a little 
unpredictable).
I think adding a setting for file encoding to 
ro.isdc.wro.http.ConfigurableWroFilter would be extremely useful.

Original issue reported on code.google.com by inta...@gmail.com on 16 Apr 2011 at 12:23

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 16 Apr 2011 at 9:45

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 10 May 2011 at 2:49

GoogleCodeExporter commented 9 years ago
Besides adding ability to specify encoding in ConfigurableWroFilter, I also 
fixed several encoding issues introduced by some of processors. Also, by 
default UTF-8 encoding is used.

Original comment by alex.obj...@gmail.com on 19 May 2011 at 9:06