3000: UTF-8 support is hard to enable

mech*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Sept. 27, 2014
What version are you running?

What's the URL of the page containing the problem?
Any field which can be filled by user

What steps will reproduce the problem?
1. Add any information containing non-Latin symbol, e.g. review title
2. Try to save this information

What is the expected output? What do you see instead?
The information is saved, because server default encoding is UTF-8
Actual result: I'm getting non-informative errors with error-code 0.

Further steps:
3. Check the encoding of the database used. It's Latin. I've converted the db to UTF-8 directly. I'm running MySQL, so I've used the following statements:
ALTER DATABASE `my_db` CHARACTER SET utf8 COLLATE utf8_general_ci;
4. I've reloaded the service, and repeated steps 1 and 2.
Expected result: I've got my non-Latin info saved, because the database encoding is now correct.
Actual result: I'm still getting Server-0 error, but my data is saved as "????? ??".

5. I've set everywhere I could find UTF-8 in both MySQL.cnf, and reviewboard.py. No difference.

The solution was to create another site with DB initially created in UTF-8. After that my data is saved properly. In my point of view there are several fixing actions for my case (from most convenient to least):
a. make utf-8 the default encoding for gnu/linux systems (as already is in lots of other applications)
b. add info about utf-8 to the installation guide, like, "now you should manually create the db... be aware that if you're planning to use non-Latin symbols, set the database encoding to utf-8"
c. add this information to FAQ at your site -- I've found lots, and lots of similar requests in the Internet.
What operating system are you using? What browser?
Debian 6.0, MySQL 5.1. This issue is browser-independent.
#1 david
  • +Component-Docs
  • +UTF-8 support is hard to enable
#2 david
  • +PendingReview
  • +david
#3 david
Fixed in release-2.0.x (0727fad).
  • -PendingReview