I am a web developer, born in PERU and now living in PDX. My platform of choice is CFML but I'm always open to learn anything. I currently work for Mentor Graphics.

I also do freelance web development and have a few open source projects that I maintain.

Where To Find Me:

BugLogHQ Updated - Always mind your charset!

September 27, 2010

I just posted to RIAForge an update to the BugLogHQ bug agregator, percolator and assimilator. This is a small update that includes some bug fixes and contributions.

The update can be found at http://bugloghq.riaforge.org/.

Also on a related note, over the weekend at work (where we use BugLogHQ) we had a ton of bug reports in BugLog that could not be saved to the DB and remained on the queue. All of them had some weird errors while trying to save a text column to the DB.

All the errors where something along the lines of:

Incorrect string value: '\xE3\x82\xBD\xE3\x83\xAA...' for column 'HTMLReport'

After googling a bit, it turned out that it was a character encoding issue (the bug reports were coming from a site that could display Japanese content). After looking at the DB I saw that all the BugLogHQ tables where using the "Latin1" charset. After changing the charset to utf8 and the collating to utf8_unicode_ci, the problem went away and the entries were successfully saved to the DB.

So as a precaution, in this update the SQL script to create the required tables now set the charset and collating correctly.

However if you are experiencing this problem just change the charset and collating in your db tables to fix it.

For MySQL you can do this in the command line with something like this:

ALTER TABLE `bl_Entry` CHANGE `HTMLReport` longtext CHARACTER SET utf8 COLLATE utf8_bin;

And repeat for any other table/column that is giving you problems.


Posted on September 27, 2010

All comments are moderated to prevent spam
Leave a comment