1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## wikipedia-utf-fix.dpatch by <serzan@hellug.gr>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: convert strings to utf-8
@DPATCH@
diff -urNad nodebox-web-1.9.2~/wikipedia.py nodebox-web-1.9.2/wikipedia.py
--- nodebox-web-1.9.2~/wikipedia.py 2008-04-10 21:09:37.000000000 +0100
+++ nodebox-web-1.9.2/wikipedia.py 2008-04-10 21:09:49.000000000 +0100
@@ -312,7 +312,7 @@
def __str__(self):
- return self.page
+ return self.page.encode("utf-8")
### WIKIPEDIAPARAGRAPH ###############################################################################
@@ -332,7 +332,7 @@
def __str__(self):
s = "\n\n".join(self)
- return s
+ return s.encode("utf-8")
### WIKIPEDIAIMAGE ###################################################################################
@@ -347,7 +347,7 @@
def __str__(self):
- return self.path
+ return self.path.encode("utf-8")
### WIKIPEDIAREFERENCES ##############################################################################
@@ -376,8 +376,8 @@
if value != "":
s += value.rstrip(".,") + ", "
- s = s.strip(", \n").encode("utf-8")
- return s
+ s = s.strip(", \n")
+ return s.encode("utf-8")
### WIKIPEDIATABLE ###################################################################################
@@ -466,7 +466,7 @@
def __str__(self):
s = "\n\n".join([str(p) for p in self.paragraphs])
- return s
+ return s.encode("utf-8")
def parse(self, light=False):
|