public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* pandoc.exe 2.0.4 generates corrupt reference.docx when using powershell.
@ 2017-12-20  9:37 Johan Mellberg
       [not found] ` <f1812fe9-cbc1-4e0b-ac33-31a97e51e411-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Johan Mellberg @ 2017-12-20  9:37 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi,

I am a new pandoc user and have just started experimenting with it. I had 
an unexpected experience, not sure if this is expected behaviour. I usually 
use a powershell to do command line tasks, but when generating the default 
reference.docx (pandoc --print-default-data-file reference.docx > 
cust-ref.docx) the resulting file is corrupted and Word cannot open it. 
Doing it in the old "DOS box" works fine. I guess this has something to do 
with encoding as the resulting file is not even a regular zip file. Running 
pandoc in powershell on an input file and generating a docx works fine, and 
that can then be used to create a custom reference docx, Thus it seems to 
be the redirection into a file that works differently in powershell. Any 
explanations for that? There was some mention of encoding changes on the 
Getting Started page but it seems a bit contrary to what I experience ("If 
you are using cmd, type chcp 65001 before using pandoc, to set the encoding 
to UTF-8.").

Thanks for any clarification!

/Johan

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f1812fe9-cbc1-4e0b-ac33-31a97e51e411%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: pandoc.exe 2.0.4 generates corrupt reference.docx when using powershell.
       [not found] ` <f1812fe9-cbc1-4e0b-ac33-31a97e51e411-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-12-20 13:16   ` Václav Haisman
       [not found]     ` <CAKw7uVjfJ981cCJiiiyjSUidoEsm4LsvKXJMZgpj=pH=dFvOOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Václav Haisman @ 2017-12-20 13:16 UTC (permalink / raw)
  To: pandoc-discuss

On 20 December 2017 at 10:37, Johan Mellberg <johan.mellberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
> I am a new pandoc user and have just started experimenting with it. I had an
> unexpected experience, not sure if this is expected behaviour. I usually use
> a powershell to do command line tasks, but when generating the default
> reference.docx (pandoc --print-default-data-file reference.docx >
> cust-ref.docx) the resulting file is corrupted and Word cannot open it.
> Doing it in the old "DOS box" works fine. I guess this has something to do
> with encoding as the resulting file is not even a regular zip file. Running
> pandoc in powershell on an input file and generating a docx works fine, and
> that can then be used to create a custom reference docx, Thus it seems to be
> the redirection into a file that works differently in powershell. Any
> explanations for that? There was some mention of encoding changes on the
> Getting Started page but it seems a bit contrary to what I experience ("If
> you are using cmd, type chcp 65001 before using pandoc, to set the encoding
> to UTF-8.").
>
> Thanks for any clarification!
>
> /Johan
>

This is a Powershell issue, not Pandoc issue. See also
https://stackoverflow.com/q/1707397/341065.

-- 
VH


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

* Re: pandoc.exe 2.0.4 generates corrupt reference.docx when using powershell.
       [not found]     ` <CAKw7uVjfJ981cCJiiiyjSUidoEsm4LsvKXJMZgpj=pH=dFvOOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-12-20 13:57       ` Johan Mellberg
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Mellberg @ 2017-12-20 13:57 UTC (permalink / raw)
  To: pandoc-discuss


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

Ah! Many thanks for that.

/Johan

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/098628ef-02e9-4a31-b33b-301aa751b2ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2017-12-20 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-20  9:37 pandoc.exe 2.0.4 generates corrupt reference.docx when using powershell Johan Mellberg
     [not found] ` <f1812fe9-cbc1-4e0b-ac33-31a97e51e411-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-12-20 13:16   ` Václav Haisman
     [not found]     ` <CAKw7uVjfJ981cCJiiiyjSUidoEsm4LsvKXJMZgpj=pH=dFvOOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-20 13:57       ` Johan Mellberg

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