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 114749 - add g_unichar_get_mirror_char
add g_unichar_get_mirror_char
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: High enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2003-06-09 03:07 UTC by Noah Levitt
Modified: 2011-02-18 16:07 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch against glib head (11.46 KB, patch)
2003-06-09 03:08 UTC, Noah Levitt
none Details | Review
updated patch (12.10 KB, patch)
2003-09-10 21:40 UTC, Noah Levitt
none Details | Review

Description Noah Levitt 2003-06-09 03:07:17 UTC
It makes sense to me for all the unicode tables to be in one place, so I
propose we remove pango_get_mirror_char from mini-fribidi (as part of the
modernization) and replace it with g_unichar_get_mirror_char.
Comment 1 Noah Levitt 2003-06-09 03:08:10 UTC
Created attachment 17340 [details] [review]
patch against glib head
Comment 2 Elijah Newren 2003-06-14 22:05:36 UTC
Adding PATCH keyword and setting priority to high because of the patch.
Comment 3 Owen Taylor 2003-08-05 20:13:03 UTC
Note that there *are* several other bunches of Unicode data 
in Pango - the break property stuff, and I just added the
TR #24 script identification. Unless something is generally
useful, I'm not sure it makes sense to move it to GLib.

That doesn't mean that we can't move this one.
Comment 4 Owen Taylor 2003-09-10 15:52:05 UTC
Three comments:

 - I think we need to switch gen-unicode-tables.pl to point
   at the *directory* including the Unicode files, rather
   than pointing at 7 individual files.

 - The docs could use some love - tell the user what the
   a mirrored character is and why they should use it.

   In Unicode, some characters are <firstterm>mirrored</firstterm>,
   this means that when the character occurs in a 
   right-to-left section of text...

   Or whatever.
  
   TRUE and FALSE should be marked up as %TRUE and %FALSE.

 - You lost the attribution that the code was from fribidi
   and the copyrights.

Other than that, looks fine to commit.
Comment 5 Noah Levitt 2003-09-10 19:25:10 UTC
> - I think we need to switch gen-unicode-tables.pl to point
>   at the *directory* including the Unicode files, rather
>   than pointing at 7 individual files.

I don't know... if you're running the script with anything other than
the current stable version of Unicode, that is less convenient,
because the files have the version in their names (see
http://www.unicode.org/Public/4.0-Update1/ for instance).
Comment 6 Noah Levitt 2003-09-10 21:40:15 UTC
Created attachment 19851 [details] [review]
updated patch
Comment 7 Owen Taylor 2003-09-11 21:54:26 UTC
I really don't think it would be hard to make the code
take a directory and figure out what files are what:

opendir (DIR, $d) || die "Cannot open Unicode data dir $d: $!\n";
while (defined ($f = readdir (DIR)) {
    $unicodedata = "$d/$f" if ($f =~ s/UnicodeData.*.txt/);
    $proplist = "$d/f" if ($f =~ s/PropList.*.txt/);
    [...]
}
closedir (DIR);

defined $unicodedata || die "Did not find UnicodeData file";
[...]

Patch looks fine to commit.
Comment 8 Noah Levitt 2003-09-12 18:26:23 UTC
2003-09-12  Noah Levitt  <nlevitt@columbia.edu>

	* glib/gen-unicode-tables.pl:
	* glib/gunichartables.h:
	* glib/gunicode.h:
	* glib/guniprop.c: Add g_unichar_get_mirror_char. (#114749)
Comment 9 Noah Levitt 2003-09-12 18:26:54 UTC
2003-09-12  Noah Levitt  <nlevitt@columbia.edu>

	* glib/gen-unicode-tables.pl: Take a directory where to look for the
	unicode files on the command line instead of 7 individual files.