luckyllama / LuckyAssetManager

a C# asset manager to combine and minimize javascript and css files
MIT License
3 stars 2 forks source link

Encoding issues #10

Open iurisilvio opened 12 years ago

iurisilvio commented 12 years ago

My javascripts were added with charset="utf-8" and are utf-8 encoded.

I tried to just hack the template constant to define charset, but it didn't worked. I guess you should define charset encoding in some other part, I don't know.

áéíóú are broken in my javascript (common letters in my language). I solved with some workaround, but I guess LuckyAssetManager should allow encoding definition.

iurisilvio commented 12 years ago

Some more information about the problem. After some tests, I discovered it is related with YuiMinimizeProcessor. Using only CombineProcessor, it works fine.

luckyllama commented 12 years ago

Passing a CultureInfo object to the Yui compressor forced me to pass a text encoding as well. I chose Encoding.Default which I'm guessing caused the issue. I'll try to figure out how to make this call without enforcing this constraint.

luckyllama commented 12 years ago

This issue is proving tricky. I can pass Encoding.UTF8 to the Yui compressor which appears to fix the issue but I'm not not sure that's the correct solution in all cases. The latest commit reflects this change but I haven't pushed this to NuGet yet.

iurisilvio commented 12 years ago

Worked to me, thanks. I guess a configurable encoding is a good solution. Thanks.

luckyllama commented 12 years ago

This is included in the prerelease 1.10.4-rc. Will promote up after some additional testing.