Displaying 4 results from an estimated 4 matches for "valid_encoding".
2009 Apr 10
4
rails2.3/ruby1.9: invalid byte sequence in utf-8 with blank?
hi all,
anyone seen this controller argument error:
invalid byte sequence in utf-8
ror/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb:
50:in `=~''
ror/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb:
50:in `!~''
ror/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb:
50:in `blank?''
2009 Apr 12
9
invalid byte sequence utf-8 OR best option to sanitize content brought in with net::http? single non-utf character causes rails to crash
...tf-8 compliant that probably
riddle my sql server database because users like to cut and paste
content from word and other places.
it turns out that because the content that i bring in via ruby
net::http has non-utf8 characters, the encoding is set to ascii8bit
and when i do force_encoding(utf-8), valid_encoding is false and the
page just fails. html::sanitize isn''t an option as i don''t want to
strip the tags. the content is from internal trusted servers that i
control. i just need to sanizite, i guess, the bad characters.
my thoughts/questions:
1) seems like rails should be less brittle...
2012 Sep 10
4
Rails error: invalid byte sequence in UTF-8
Hello,
i have a app on rails 3.2.1 and i use a jquery lib called jQuery Timelinr
0.9.5: http://www.csslab.cl/2011/08/18/jquery-timelinr/
but, when i use it on a .erb view, i got a error:
Showing *
/home/carlos.ribeiro/projetos/amarribo/app/views/conheca/historico.html.erb*
where
line *#59* raised:
invalid byte sequence in UTF-8
Extracted source (around line *#59*):
57:
58: <%=
2011 Jun 17
7
Encoding
What''s a good solution for fixing character encoding problems for
compatibility between ascii and utf-8? The database is postgres and
is encoded in utf-8.
Once in awhile there will be a compatibility error from strings from a
webform.
Is there a command to fix this besides using
a_string.force_encoding(''utf-8'')? Even this doesn''t seem to always
work either.