Thursday, June 30, 2011

Gettext and codesets. UTF-8 in particular

For the longest time, Japanese translations weren't working and kept returning ???? instead of the correct Japanese characters. A college finally found the solution:

bind_textdomain_codeset("messages", 'UTF-8');


where "messages" is the text domain that was bound with the textdomain command.

Stupidly difficult bug to tackle.