[Koha-patches] [PATCH] [SIGNED-OFF] Bug 2629: add char-with-stroke support to word-phrase-utf.chr

Katrin Fischer Katrin.Fischer.83 at web.de
Thu Aug 11 17:39:04 CEST 2011


From: Ian Walls <ian.walls at bywatersolutions.com>

This patch adds diacritic search support for the following characters-with-stroke:
a,b,c,d,e,h,l,r,t,u,y,z

Handles both uppercase and lowercase mappings.

Also corrects a note in word-phrase-utf.chr:  the 'equivalent' command is NOT for searching,
but rather for sorting.  See Zebra manual: http://www.indexdata.com/zebra/doc/character-map-files.html,
near the bottom.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>

Some notes:
- Copied the file to my koha-dev folder and reindexed
- Tried some simple searches like: Süden and Suden, schon und schön with success
- Added some of the new characters to a record and tried search with and
  without diacritics (ɨƗʉⱥɆɌ and iiuaer) with success.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
---
 etc/zebradb/etc/word-phrase-utf.chr |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/etc/zebradb/etc/word-phrase-utf.chr b/etc/zebradb/etc/word-phrase-utf.chr
index b41b298..e0e2297 100644
--- a/etc/zebradb/etc/word-phrase-utf.chr
+++ b/etc/zebradb/etc/word-phrase-utf.chr
@@ -11,7 +11,7 @@ uppercase {0-9}{A-Z}
 # Breaking characters
 space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~’
 
-# Characters to be considered equivalent for searching purposes
+# Characters to be considered equivalent for sorting purposes
 equivalent aáàãåâăąȧǎȁȃ
 equivalent ӕä(ae)
 equivalent ā(aa)
@@ -56,6 +56,8 @@ map ȁ			a
 map Ȁ			a
 map ȃ			a
 map Ȃ			a
+map ⱥ			a
+map Ⱥ			a
 # AE 
 map ӕ			(ae)
 map Ӕ			(ae)
@@ -84,6 +86,8 @@ map ȉ			i
 map Ȉ			i
 map ȋ			i
 map Ȋ			i
+map ɨ			i
+map Ɨ			i
 # U  
 map ū			u
 map Ū			u
@@ -109,6 +113,8 @@ map ȕ			u
 map Ȕ			u
 map ȗ			u
 map Ȗ			u
+map ʉ			u
+map Ʉ			u
 # E  
 map ê			e
 map Ê			e
@@ -134,6 +140,8 @@ map ȅ			e
 map Ȅ			e
 map ȇ			e
 map Ȇ			e
+map ɇ			e
+map Ɇ			e
 # O  
 map ô			o
 map Ô			o
@@ -175,6 +183,8 @@ map Ṝ			r
 map ř			r
 map Ř			r
 map ṟ			r
+map ɍ			r
+map Ɍ			r
 # L 
 map ḷ			l
 map Ḷ			l
@@ -182,6 +192,9 @@ map ḹ			l
 map Ḹ			l
 map ḻ			l
 map Ḻ			l
+map ł			l
+map Ł			l
+
 # N  
 map ṅ			n
 map Ṅ			n
@@ -198,9 +211,13 @@ map Ṇ			n
 # T  
 map ṭ			t
 map Ṭ			t
+map ŧ			t
+map Ŧ			t
 # D 
 map ḍ			d
 map Ḍ			d
+map đ			d
+map Đ			d
 # S  
 map ś			s
 map Ś			s
@@ -221,6 +238,8 @@ map Ṃ			m
 map ḥ			h
 map Ḥ			h
 map ẖ			h
+map ħ			h
+map Ħ			h
 # Z 
 map ź			z
 map Ź			z
@@ -228,6 +247,8 @@ map ẓ			z
 map Ẓ			z
 map ż			z
 map Ż			z
+map ƶ			z
+map Ƶ			z
 #C 
 map ç			c
 map Ç			c
@@ -235,6 +256,8 @@ map ć			c
 map Ć			c
 map č			c
 map Č			c
+map ȼ			c
+map Ȼ			c
 # G 
 map ǥ			g
 map Ǥ			g
@@ -250,6 +273,8 @@ map Ḵ			k
 # Y  
 map ý			y
 map Ý			y
+map ɏ			y
+map Ɏ			y
 
 # mapping blank string
 map (^impr\s)       @
-- 
1.7.4.1



More information about the Koha-patches mailing list