After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322311 - New defined viewname with non-ASCII characters is not displayed in the View menu on some Non Ascii locale
New defined viewname with non-ASCII characters is not displayed in the View m...
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Do Not Use
2.4.x (obsolete)
Other Solaris
: Normal major
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2005-11-24 10:07 UTC by Xiurong Simon Zheng
Modified: 2013-09-13 12:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for this bug (1.50 KB, patch)
2005-11-25 08:47 UTC, Xiurong Simon Zheng
accepted-commit_now Details | Review

Description Xiurong Simon Zheng 2005-11-24 10:07:20 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
Comment 1 Xiurong Simon Zheng 2005-11-24 10:08:03 UTC
This is evolution basic I18N function.
Comment 2 Xiurong Simon Zheng 2005-11-25 08:47:00 UTC
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.
Comment 3 André Klapper 2005-11-25 15:24:20 UTC
confirming, same with evolution2.5.2.
Comment 4 Srinivasa Ragavan 2005-11-29 05:42:24 UTC
Looks fine to commit.
Comment 5 Xiurong Simon Zheng 2005-11-29 06:09:41 UTC
Patch has been committed to gnome-2-12 and head.