I'm not sure about codeblocks, but in the stc source the average char width for a font is set like this:
m_averageCharWidth = textmetrics.width/extentTest.length();
where extentTest is is a wxString built from " `~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
Obviously that's going to have trouble with nonlatin characters. A better test for average char width is needed that can account for nonlatin characters, but I have no clue how to do that.