Ruby on Rails 3, incompatible character encodings: UTF-8 and ASCII-8BIT with i18n

Ok so problem solved after some hours of googling… There was actually two bugs in my code. The first one was a file encoding error and the second was the problem with the MySQL Data base configuration. First, to solve the error caused by MySQL I used this two articles : http://www.dotkam.com/2008/09/14/configure-rails-and-mysql-to-support-utf-8/ http://www.rorra.com.ar/2010/07/30/rails-3-mysql-and-utf-8/ Second, to … Read more

UTF8 vs. UTF16 vs. char* vs. what? Someone explain this mess to me!

Check out Joel Spolsky’s The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) EDIT 20140523: Also, watch Characters, Symbols and the Unicode Miracle by Tom Scott on YouTube – it’s just under ten minutes, and a wonderful explanation of the brilliant ‘hack’ that is UTF-8

When to use utf8 as a header in py files

wherever you need to use in your code chars that aren’t from ascii, like: ă interpreter will complain that he doesn’t understand that char. Usually this happens when you define constants. Example: Add into x.py print ‘ă’ then start a python console import x Traceback (most recent call last): File “<stdin>”, line 1, in <module> … Read more

C programming: How can I program for Unicode?

C99 or earlier The C standard (C99) provides for wide characters and multi-byte characters, but since there is no guarantee about what those wide characters can hold, their value is somewhat limited. For a given implementation, they provide useful support, but if your code must be able to move between implementations, there is insufficient guarantee … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)