kylejginavan / youtube_it

An object-oriented Ruby wrapper for the YouTube GData API
http://groups.google.com/group/ruby-youtube-library
595 stars 223 forks source link

Incompatible charset encoding ASCII UTF-8 #149

Closed reydelleon closed 11 years ago

reydelleon commented 11 years ago

I'm getting the error "Incompatible character encodings: ASCII-8BITand UTF-8" in this line: <%= raw youtube_client.my_video(@video.video_code).embed_html %>

I've set the default charset to UTF-8, have put the "magic comments" in my sources "# encoding: UTF-8" and still I'm getting the error. If I comment the problematic line, the page loads, but if I uncomment it, the it breaks. I'm using Ruby 1.9.3 and Rails 3.2.11. Is it a Youtube_it problem? Any help would be appreciated.

reydelleon commented 11 years ago

I solved this. There was a "ñ" character in other line in my source. The problem was that the error stack was pointing to the Youtube_it line.

reydelleon commented 11 years ago

I solved this. There was a "ñ" character in other line in my source. The problem was that the error stack was pointing to the Youtube_it line.