Forum Discussion

Ajay_Chawda's avatar
Ajay_Chawda
Contributor
3 years ago

Write file to US-ASCII file format

Hello Experts ,
I’m trying to write file in US-ASCII file format.

i have used mapper–>binary copy–>transcoder–>file writer snap.

Mapper has input string and binary output. Binary copy snap to make copy of result of mapper.
transcoder snap with setting UTF-8 to US-ANSCII format and then file writer snap to write file.

But transcoder fails with error saying “Failed to transcode from UTF-8 to US-ASCII, reason=The character set in the input data may not be UTF-8,”

above pipeline is getting triggered from parent pipeline which pass input string to this pipeline.

Any suggestion what wrong i’m doing over here?

Regards,
Ajay

4 Replies

  • Hi Ajay,

    Can you please explain how your Mapper is configured? It’s very unusual to have binary output for a Mapper.

    • ptaylor's avatar
      ptaylor
      Employee

      What sort of file are you trying to write? A JSON file?

      • Ajay_Chawda's avatar
        Ajay_Chawda
        Contributor

        @ptaylor thank you for reply, trying to write plain string to file in ascii format. used mapper with binary output view to avoid additional snap to convert document to binary.