Mailing List Archive

Re: Character Encoding Trouble [SOLVED]
On Jan 26, 2010, at 2:03 PM, David E. Wheeler wrote:

> On Jan 26, 2010, at 10:55 AM, Waldo Jaquith wrote:
>
>> I had no idea that there were so many places to set character sets in Bricolage. :) Under Admin->Sstem->Preferences, character set is set to UTF-8. "Can be Overridden" is set to "No." So everything is apparently OK in Bricolage. I've checked the database (MySQL), and all is well there—every database, table, and column that I've seen is utf8_unicode_ci. I'm running out of places to specify the character set. :)
>
> Oh, I forgot you were using MySQL. I'll bet that the issue is that Perl isn't getting the data out of MySQL with the utf8 flag set. Try this patch:
>
> --- a/lib/Bric/Util/DBD/mysql.pm
> +++ b/lib/Bric/Util/DBD/mysql.pm
> @@ -52,6 +52,7 @@ use constant DSN_STRING => 'database=' . DB_NAME
>
> # This is to set up driver-specific database handle attributes.
> use constant DBH_ATTR => (
> + mysql_enable_utf8 => 1,
> Callbacks => {
> connected => sub {
> my $dbh = shift;

Aaahhhhhhhhhh... That's *so* much better. I feel like I just got a long-stuck splinter out of my foot or worked up the nerve to yank out a long-swollen tastebud. Why, combined with the cheerfully-titled "mysql_hate.patch" that you provided me with last October, I think Bricolage is now placing nicely with MySQL. :) Thanks for that, David!


>> Incidentally, I just spotted a bug there—overridden is misspelled in the column head as "overriden," with just one "d". Merriam Webster says that only the double-d version is correct.
>
> Where? In the database?

I'm sorry—I reorganized that e-mail and forgot to keep that bug report adjacent to the relevant point. :) Under Admin->System->Preferences, it's the fourth <th> in the "listManager" table. "Overridden" is spelled correctly in the sortby attribute in the URL, incidentally—I think it's just in the text that it's misspelled.

Best,
Waldo


---
Virginia Quarterly Review
One West Range, Box 400223
University of Virginia
Charlottesville, VA 22904-4223
434-243-4995
Re: Character Encoding Trouble [SOLVED] [ In reply to ]
On Jan 26, 2010, at 12:03 PM, Waldo Jaquith wrote:

> I'm sorry—I reorganized that e-mail and forgot to keep that bug report adjacent to the relevant point. :) Under Admin->System->Preferences, it's the fourth <th> in the "listManager" table. "Overridden" is spelled correctly in the sortby attribute in the URL, incidentally—I think it's just in the text that it's misspelled.

Ah, got it. Fixed, thanks!

David