lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I avoid unicode and use Latin1?


From: Jan Nieuwenhuizen
Subject: Re: How can I avoid unicode and use Latin1?
Date: Sun, 04 Sep 2005 08:31:26 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

> I would like to thank Daniel Johnson and Hans de Rijck, who both posted
> the algorithm for converting Latin1 to unicode,

Just for the record, if your editor does not support recoding, the
recode tool will help

    recode latin1..utf8

or using Python

import codecs
import sys
de_latin1 = codecs.getdecoder ('latin1')
en_utf_8 = codecs.getencoder ('utf_8')

print en_utf_8 (de_latin1 (open (sys.argv[1]).read ())[0])[0]

Jan.
-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]