public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* pandoc: Cannot decode byte '\xc9': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream
@ 2019-10-19 15:49 Louis de Blois
       [not found] ` <abb0e387-0d90-42dc-8184-c3f4a2a8ce57-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Louis de Blois @ 2019-10-19 15:49 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1194 bytes --]



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.

[-- Attachment #1.2: Type: text/html, Size: 6267 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pandoc: Cannot decode byte '\xc9': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream
       [not found] ` <abb0e387-0d90-42dc-8184-c3f4a2a8ce57-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-10-21  5:36   ` John MacFarlane
       [not found]     ` <m2sgnmu0bd.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2019-10-21  5:36 UTC (permalink / raw)
  To: Louis de Blois, pandoc-discuss


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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pandoc: Cannot decode byte '\xc9': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream
       [not found]     ` <m2sgnmu0bd.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-10-21 10:11       ` Louis de Blois
  0 siblings, 0 replies; 3+ messages in thread
From: Louis de Blois @ 2019-10-21 10:11 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2351 bytes --]

That works !

In fact, I didn't use the iconv function properly...

Thank you very much !

Le lundi 21 octobre 2019 07:36:56 UTC+2, John MacFarlane a écrit :
>
>
> 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 <ldeblo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> 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-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> > 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/cc25be7d-48e0-4937-8a3c-3e35866bca64%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 4414 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-21 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-19 15:49 pandoc: Cannot decode byte '\xc9': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream Louis de Blois
     [not found] ` <abb0e387-0d90-42dc-8184-c3f4a2a8ce57-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-10-21  5:36   ` John MacFarlane
     [not found]     ` <m2sgnmu0bd.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-10-21 10:11       ` Louis de Blois

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).