Skip to content

Commit 9bbcbb4

Browse files
committed
fix language encodes when not adding xdetails
1 parent a3af2a8 commit 9bbcbb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

zap2xml.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,9 @@ def printProgrammes(fh):
13601360

13611361
if "description" in programs[p] and programs[p]["description"] is not None:
13621362
xdets = ""
1363-
tmp = enc(programs[p]["description"])
1363+
tmp = programs[p]["description"]
1364+
tmp = unicode(BeautifulStoneSoup(tmp, convertEntities=BeautifulStoneSoup.ALL_ENTITIES))
1365+
tmp = enc(tmp)
13641366
if "-X" in options:
13651367
xdets = addXDetails(programs[p], schedule[station][s])
13661368
fh.write("\t\t<desc lang=\"" + lang + "\">" + xdets + "</desc>\n")

0 commit comments

Comments
 (0)