Mercurial > repo
changeset 6501:6ca43f5f4d7d
<Melvar> ` sed -i -e \'s/inp[)]$/unicode(inp, locale.getpreferredencoding())).encode(locale.getpreferredencoding())/\' -e \'2s/$/, locale/\' bin/loudly
author | HackBot |
---|---|
date | Sun, 03 Jan 2016 11:48:31 +0000 |
parents | f2447fa315a9 |
children | f7c0857ad6f4 |
files | bin/loudly |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/loudly Sun Jan 03 11:47:13 2016 +0000 +++ b/bin/loudly Sun Jan 03 11:48:31 2016 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/env python -import sys, itertools, locale +import sys, itertools, locale, locale inp = len(sys.argv) >= 2 and sys.argv[1] or raw_input() cyc = itertools.cycle(["\00304,09","\00309,04"]) -print "".join(cyc.next() + c for c in inp) +print "".join(cyc.next() + c for c in unicode(inp, locale.getpreferredencoding())).encode(locale.getpreferredencoding())