[chirp_devel] [PATCH] [RepeaterBook] Convert iso-8859-1 to unicode so OSX pyGTK doesn't crash. #3769
Tom Hayward
Thu Jun 23 17:01:42 PDT 2016
# HG changeset patch
# User Tom Hayward <tom at tomh.us>
# Date 1466726481 25200
# Thu Jun 23 17:01:21 2016 -0700
# Node ID f15aea5a4521c2b5fc51f88ea4d7920db24d4992
# Parent 8b3d55b062857b9d89538ac4539742dcccdad92f
[RepeaterBook] Convert iso-8859-1 to unicode so OSX pyGTK doesn't crash. #3769
diff -r 8b3d55b06285 -r f15aea5a4521 chirp/ui/mainapp.py
--- a/chirp/ui/mainapp.py Thu Jun 23 07:25:47 2016 -0700
+++ b/chirp/ui/mainapp.py Thu Jun 23 17:01:21 2016 -0700
@@ -931,6 +931,16 @@
VENDOR = "RepeaterBook"
MODEL = ""
+ def _clean_comment(self, headers, line, mem):
+ "Converts iso-8859-1 encoded comments to unicode for pyGTK."
+ mem.comment = unicode(mem.comment, 'iso-8859-1')
+ return mem
+
+ def _clean_name(self, headers, line, mem):
+ "Converts iso-8859-1 encoded names to unicode for pyGTK."
+ mem.name = unicode(mem.name, 'iso-8859-1')
+ return mem
+
try:
# Validate CSV
radio = RBRadio(filename)
More information about the chirp_devel
mailing list