rpms/alexandria/devel alexandria-0.6.3-library-utf8-string.patch, NONE, 1.1 alexandria.spec, 1.19, 1.20

Mamoru Tasaka mtasaka at fedoraproject.org
Wed Feb 25 18:24:27 UTC 2009


Author: mtasaka

Update of /cvs/extras/rpms/alexandria/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26678

Modified Files:
	alexandria.spec 
Added Files:
	alexandria-0.6.3-library-utf8-string.patch 
Log Message:
* Thu Feb 26 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.3-9
- Attempt to handle UTF-8 strings in library names correctly


alexandria-0.6.3-library-utf8-string.patch:

--- NEW FILE alexandria-0.6.3-library-utf8-string.patch ---
--- alexandria-0.6.3/lib/alexandria/ui/sidepane.rb.utf-8	2008-02-21 10:11:37.000000000 +0900
+++ alexandria-0.6.3/lib/alexandria/ui/sidepane.rb	2009-02-26 03:11:27.000000000 +0900
@@ -20,17 +20,22 @@
       end
 
       def contains_illegal_character new_text
-        /([^\w\s'"()&?!:;.\-])/.match(new_text)
+        #/([^\w\s'"()&?!:;.\-])/.match(new_text)
+        begin
+          new_text.unpack("U*")
+        rescue
+          return true
+        end
+        return false
       end
 
       def on_edited_library cell, path_string, new_text
         log.debug { "edited" }
         if cell.text != new_text
-          if match = contains_illegal_character(new_text)
+          if contains_illegal_character(new_text)
             log.debug { "Illegal character" }
             ErrorDialog.new(@main_app, _("Invalid library name '%s'") % new_text,
-              _("The name provided contains the " + "illegal character '<i>%s</i>'.") %
-            match[1].gsub(/&/, "&"))
+              _("The name provided contains illegal characters"))
           elsif new_text.strip.empty?
             log.debug { "Empty text" }
             ErrorDialog.new(@main_app, _("The library name " +


Index: alexandria.spec
===================================================================
RCS file: /cvs/extras/rpms/alexandria/devel/alexandria.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- alexandria.spec	23 Feb 2009 22:10:56 -0000	1.19
+++ alexandria.spec	25 Feb 2009 18:23:57 -0000	1.20
@@ -5,14 +5,14 @@
 %define		majorver	0.6.3
 %undefine		minorver	
 
-%define		fedorarel	8
+%define		fedorarel	9
 %define		rel		%{?minorver:0.}%{fedorarel}%{?minorver:.%minorver}
 
 
 
 Name:		alexandria
 Version:	%{majorver}
-Release:	%{rel}%{?dist}.1
+Release:	%{rel}%{?dist}
 Summary:	Book collection manager
 
 Group:		Applications/Productivity
@@ -20,6 +20,7 @@
 URL:		http://alexandria.rubyforge.org/
 Source0:	http://rubyforge.org/frs/download.php/%{repoid}/%{name}-%{version}%{?minorver}.tar.gz
 #Patch0:		alexandria-0.6.3-crash_tooltips.patch
+Patch1:		alexandria-0.6.3-library-utf8-string.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:	noarch
@@ -68,6 +69,7 @@
 %prep
 %setup -q -n %{name}-%{majorver}%{?minorver}
 #%%patch0 -p1 -b .tooltips
+%patch1 -p1 -b .utf_8
 
 %build
 rake build
@@ -187,6 +189,9 @@
 %{_datadir}/icons/hicolor/*/apps/%{name}.*
 
 %changelog
+* Thu Feb 26 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.3-9
+- Attempt to handle UTF-8 strings in library names correctly
+
 * Tue Feb 24 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp>
 - F-11: Mass rebuild
 




More information about the fedora-extras-commits mailing list