From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: Louis de Blois
<ldeblois2286-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
pandoc-discuss
<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: pandoc: Cannot decode byte '\xc9': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream
Date: Sun, 20 Oct 2019 22:36:38 -0700 [thread overview]
Message-ID: <m2sgnmu0bd.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <abb0e387-0d90-42dc-8184-c3f4a2a8ce57-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
As the manual says, the input must be UTF-8 encoded text.
Your input is probably latin-1 encoded.
See https://pandoc.org/MANUAL.html#character-encoding
You can use iconv to convert on the fly.
iconv -f latin1 -t utf-8 input.tex | pandoc -s -f latex -o output.docx
Louis de Blois <ldeblois2286-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Hello !
>
>
> Since a month I have had a problem with pandoc. It's a quite regular
> problem, I have seen, but I haven't found my solution.
>
>
> I want to convert a tex file in docx (or odt) :
> pandoc -s input.tex -o ouput.docx
>
> But I recept this message :
> pandoc: Cannot decode byte '\xe9': Data.Text.Internal.Encoding.Fusion.
> streamUtf8: Invalid UTF-8 stream
>
>
> After many research, I've found that \xe9 is the latin small letter e with
> acute (é or è ?).
>
>
> This command from the pandoc documentation :
>
> iconv -t utf-8 input.tex | pandoc | iconv -f utf-8
>
> doesn't work :
> iconv: séquence d'échappement non permise à la position 401
>
> <p>\begin{document}</p>
>
>
> As I can't not use this character, would you have a solution, please ?
>
>
> Thank you !
>
> --
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/abb0e387-0d90-42dc-8184-c3f4a2a8ce57%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m2sgnmu0bd.fsf%40johnmacfarlane.net.
next prev parent reply other threads:[~2019-10-21 5:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-19 15:49 Louis de Blois
[not found] ` <abb0e387-0d90-42dc-8184-c3f4a2a8ce57-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-10-21 5:36 ` John MacFarlane [this message]
[not found] ` <m2sgnmu0bd.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-10-21 10:11 ` Louis de Blois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2sgnmu0bd.fsf@johnmacfarlane.net \
--to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
--cc=ldeblois2286-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).