From: Dave P. <dav...@gm...> - 2012-12-10 14:58:26
|
On 10 December 2012 13:49, Brian Neal <bg...@gm...> wrote: > > On Mon, Dec 10, 2012 at 1:34 AM, Dave Pawson <dav...@gm...> wrote: >> >> Not that I was redirecting output to the output file? (The commented out >> line) >> This created the problem. It would seem to be a difference between >> redirection and >> cp and >> >> The replacement line solves that problem. >> It would seem redirected output is unable to utilise an appropriate >> character set. > > > I've run into this before. It isn't a problem with Markdown, more of an > issue with Python 2.7 and redirection to a pipe. See > > http://stackoverflow.com/questions/4545661/unicodedecodeerror-when-redirecting-to-file > > In particular the answer by Mark Tolonen has helped me in the past. "Python 3 defaults to 'utf8', but based on the OP's sample, he's using Python 2.X, which defaults to 'ascii'. – Mark Tolonen Jan 5 '11 at 18:49" That explains it. Thanks Brian. Nice to know why. I'm on Fedora, which uses Python heavily for scripts, so I'm reluctant to install 3 ahead of Fedora. My solution works which is enough for me. regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |