From 18dd11a22dd6ceff74d039efc21862556d87acfc Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Thu, 30 Aug 2007 01:06:19 +0200 Subject: [PATCH] MusicXML: replace soft-hyphens in the lyrics with soft dash Soft-hypens (created by an OMR software from scans) will make the ascii codec as well as lilypond later barf on that unicode character. --- python/musicxml.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/musicxml.py b/python/musicxml.py index d394697c54..0d4813de1d 100644 --- a/python/musicxml.py +++ b/python/musicxml.py @@ -1,4 +1,5 @@ import new +import string from rational import * class Xml_node: @@ -326,6 +327,10 @@ class Lyric (Music_xml_node): if text: text = text.get_text() + # We need to convert soft hyphens to -, otherwise the ascii codec as well + # as lilypond will barf on that character + text = string.replace( text, u'\xad', '-' ) + if text == "-" and continued: return "--" elif text == "_" and continued: -- 2.39.5