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 723106 - search-provider: Reimplement normalize_casefold_and_unaccent in terms of g_str_to_ascii
search-provider: Reimplement normalize_casefold_and_unaccent in terms of g_st...
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-27 14:54 UTC by Debarshi Ray
Modified: 2014-04-03 09:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
search-provider: Reimplement normalize_casefold_and_unaccent (4.62 KB, patch)
2014-01-27 14:55 UTC, Debarshi Ray
none Details | Review
search-provider: Reimplement normalize_casefold_and_unaccent (3.77 KB, patch)
2014-04-02 12:05 UTC, Debarshi Ray
accepted-commit_now Details | Review
search-provider: Reimplement normalize_casefold_and_unaccent (3.76 KB, patch)
2014-04-03 07:52 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2014-01-27 14:54:30 UTC
This removes our copy-pasted unaccenting logic. It would be even better if GLib had an API that just did the unaccenting because we are not interested in the tokenizing.
Comment 1 Debarshi Ray 2014-01-27 14:55:56 UTC
Created attachment 267316 [details] [review]
search-provider: Reimplement normalize_casefold_and_unaccent
Comment 2 Christian Persch 2014-02-18 20:10:25 UTC
Hmm. It's not apparent to me that the before and the after code are equivalent...
Comment 3 Matthias Clasen 2014-02-19 16:37:34 UTC
Maybe the incoming g_str_to_ascii could come in handy ?
Comment 4 Debarshi Ray 2014-04-01 14:53:56 UTC
Sorry for letting this slip through the cracks.

As Matthias says, I think the new g_str_to_ascii is what we want to use here. It did not exist when I wrote this patch, so I abused g_str_tokenize_and_fold instead. Now that g_str_to_ascii exists and g_str_tokenize_and_fold is implemented in terms of it, we can just use the new API.

Christian, what did you find suspicious? Are you curious about why I did not use g_str_match_string? I explained that bit in https://bugzilla.gnome.org/show_bug.cgi?id=711075#c22 Or is it something else?
Comment 5 Debarshi Ray 2014-04-02 12:05:52 UTC
Created attachment 273465 [details] [review]
search-provider: Reimplement normalize_casefold_and_unaccent

Redone in terms of g_str_to_ascii.
Comment 6 Christian Persch 2014-04-02 18:03:55 UTC
Comment on attachment 273465 [details] [review]
search-provider: Reimplement normalize_casefold_and_unaccent

>+GLIB_REQUIRED=2.39.91

Use 2.40.0.

With that fixed, ok to commit. Thanks!
Comment 7 Debarshi Ray 2014-04-03 07:52:19 UTC
Created attachment 273506 [details] [review]
search-provider: Reimplement normalize_casefold_and_unaccent

Fixed as suggested and committed.