incompatible character encodings: ASCII-8BIT and UTF-8


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
4 views
Problem with encoding in ruby 1.9.2
by | 4 views

3 Answers

0 like 0 dislike
by
0 like 0 dislike
Patch not the best solution, but it works, if you have always UTF-8.
\r
A good overview of the problem from Yehuda Katz
\r
Check carefully that 1) the encoding of data from the database; 2) the encoding of the form data, which are further stored in the database and 3) the encoding of the templates and views (view) — for example, save all in UTF-8 without BOM.
\r
'mysql' often returns data in ASCII-8BIT (default encoding for binary data). As a variant put 'ruby-mysql'.
\r
'pg' works for me without errors.
by
0 like 0 dislike
I helped gem 'russian'.
by

Related questions

0 like 0 dislike
1 answer
asked Apr 14, 2019 by Gigabait
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
27,972 users