Closed volkanunsal closed 13 years ago
I get the same error and took the alexandrebini fork in the meantime
In 1.9, read an non-ASCII file as binary, the content encoding will not be valid.
We can not assume the file was utf-8 neither due to other possibility.
Just read file as normal may be a good choice(also solve this issue), but I don't known is this gonna broken other functions.
diff --git a/lib/jammit/compressor.rb b/lib/jammit/compressor.rb
index 7d62431..d4d1b5d 100644
--- a/lib/jammit/compressor.rb
+++ b/lib/jammit/compressor.rb
@@ -244,7 +244,7 @@ module Jammit
# `File.read`, but in "binary" mode.
def read_binary_file(path)
- File.open(path, 'rb') {|f| f.read }
+ File.open(path, 'r') {|f| f.read }
end
end
I tried that, but didn't work for me.
What was the error raised then?
It maybe raised due to your file was neither ASCII nor utf-8.
Same error(s). But no mention of any files in sight. I'd gladly change the formatting if I knew the file causing this.
Is there a particular patch here we can adopt to fix this?
I started seeing this error message today, along with this explanatory text.
"\xC3" from ASCII-8BIT to UTF-8
Any idea what I can do to fix it?
btw, I am using clousre compiler. When I switch to YUI I get this error message instead.
YUI::Compressor::RuntimeError