GNOME Bugzilla – Bug 322311
New defined viewname with non-ASCII characters is not displayed in the View menu on some Non Ascii locale
Last modified: 2013-09-13 12:25:03 UTC
Version details: 2.4 trunk Distribution/Version: solaris 10 Steps to reproduce: - Switch to locale de_DE.iso8859-15, and lauch evolution. - Open the contact folder and click on View --> Current View --> Define Views. - Click on "New". - Specify a name for the view that contains non-ASCII characters. - Specify the type of view - Card View/Table. - Click on OK. - For the case of Table - in the dialog that appears, specify the "Fields Shown", "Group By" and "Sort" and click on Apply and then on OK. - Select the new view. Result: new defined viewname is not displayed in the View menu
This is evolution basic I18N function.
Created attachment 55212 [details] [review] patch for this bug When adding new defined view name, an id needs to be generated from the defined name. gal_view_generate_string() traverses UTF-8 string and replace character that is neither a alpha nor a numeral to '_'. This traverse is done according to byte order, not character order. As we know, UTF-8 character is a multi-byte sequence. Sometimes, the first byte is regarded as a alpha, but the second is not and is replaced as '_'. Obviously, this character is invalid. And then build_menus() can't deal with this kind of invalid strings, so the defined view won't be displayed. Therefore, we should traverse the UTF-8 string according to character order.
confirming, same with evolution2.5.2.
Looks fine to commit.
Patch has been committed to gnome-2-12 and head.