From: Reinhold Kainhofer Date: Wed, 29 Aug 2007 23:06:19 +0000 (+0200) Subject: MusicXML: replace soft-hyphens in the lyrics with soft dash X-Git-Tag: release/2.11.32-1~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=18dd11a22dd6ceff74d039efc21862556d87acfc;p=lilypond.git 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. --- 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: