[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#306895: #306895: recode bg_BG.ff and bg_BG.dic to UTF-8



tags 306895 patch
thanks

Here relly is a patch that recodes bg_BG.aff and bg_BG.dic to UTF-8.

My first attempt with git-send-mail was unsuccessful.
From dff1c8eb730f657a2f190f7cf68b4b0157904457 Mon Sep 17 00:00:00 2001
From: Damyan Ivanov <dmn@debian.org>
Date: Fri, 3 Sep 2010 13:50:14 +0300
Subject: [PATCH] recode bg_BG.aff and bg_BG.dic to UTF-8

This fixes #306895 in Debian and #346856 in Ubuntu.

Only these two files are recoded and the heading in bg_BG.add is changed from
'SET microsoft-1251' to 'SET UTF-8'

The .dic file becomes ~80% larger after the conversion (1.5MB), but I guess
this is a price to be paid.
---
 debian/changelog |    8 ++++++++
 debian/rules     |    5 +++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index dc805be..cc62005 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+bgoffice (3.0-12) UNRELEASED; urgency=low
+
+  * convert bg_BG.{dic,aff} to UTF-8.
+    Finally closes: #306895 and LP#346856 -- myspell: wrong charset for either
+    OpenOffice.org or mozilla-thinderbird/gedit/gtranslator/...
+
+ -- Damyan Ivanov <dmn@debian.org>  Fri, 03 Sep 2010 12:42:13 +0300
+
 bgoffice (3.0-11) unstable; urgency=medium
 
   * QA upload.
diff --git a/debian/rules b/debian/rules
index e617ffb..b5481f0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,12 +31,13 @@ build-stamp:
 	     }' ${build_dir}/bg_BG.aff >debian/bg_affix.dat
 	awk '{ \
 		if($$1 == "SET") \
-			print "SET microsoft-cp1251"; \
+			print "SET UTF-8"; \
 		else \
 			print; \
-	     }' ${build_dir}/bg_BG.aff >debian/bg_BG.aff
+	     }' ${build_dir}/bg_BG.aff | konwert cp1251-utf8 > debian/bg_BG.aff
 	awk -f debian/oo2ispell.awk <${build_dir}/bg_BG.aff >${build_dir}/bulgarian.aff
 	tail -n +2 <${build_dir}/bg_BG.dic | sort -t/ -k1,1 -f >${build_dir}/bulgarian.dic
+	konwert -O cp1251-utf8 ${build_dir}/bg_BG.dic
 	cd ${build_dir} && buildhash bulgarian.dic bulgarian.aff bulgarian.hash
 	LC_ALL=bg_BG sort ${build_dir}/bg_words.dat >${build_dir}/bulgarian
 	mkdir -p debian/docs
-- 
1.7.1

Attachment: signature.asc
Description: Digital signature


Reply to: