]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/musicxml.py
MusicXML: replace soft-hyphens in the lyrics with soft dash
[lilypond.git] / python / musicxml.py
index d394697c54eae5225a77d97b9d85d0d5da20b698..0d4813de1db5607dbd05963504a2bce0a673f831 100644 (file)
@@ -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: