unicoded output redirection

From: J. van der Knaap (spamzuigt_at_pastrami.be)
Date: 06/30/04

  • Next message: greger: "Re: Need suggestions"
    Date: Wed, 30 Jun 2004 13:26:25 +0200
    
    

    I've written a perl script that prints a report to STDOUT containing
    non-standard ASCII characters (a box/table). I'm quite pleased with the
    way it looks on the cli. However, when I redirect the output to a file,
    it stores it in what I assume is ANSI format. This ruins my pretty box. :(

    Would it be possible to redirect to a unicoded file?

    Alternatively I could alter the perl script to write directly to
    unicoded file, which I believe could be done by something like this:

    open FH, ">:encoding(ucs2)", "file";

    However that would mean a boatload of work I'm not looking forward to.
    So if there's a way to simply redirect to a unicoded file I'd gladly try
    that first.

    Any help, suggestions would be appreciated.

    Joost


  • Next message: greger: "Re: Need suggestions"

    Relevant Pages

    • Re: unicoded output redirection
      ... >> I've written a perl script that prints a report to STDOUT containing ... >> Would it be possible to redirect to a unicoded file? ... >> So if there's a way to simply redirect to a unicoded file I'd gladly ... Joost ...
      (perl.beginners)
    • Re: unicoded output redirection
      ... However, when I redirect the output to a file, ... > Alternatively I could alter the perl script to write directly to ... > unicoded file, which I believe could be done by something like this: ... Joost ...
      (perl.beginners)
    • Re: $/ variable trouble
      ... I am using the diamond operator to redirect input to my perl script. ... having it read from STDIN and redirecting the process's STDIN to be ...
      (perl.beginners)
    • Re: file redirect within back ticks not working
      ... ktom wrote: ... > from with a perl script this line does not work ... > it seems the redirect does not work. ... Fort Worth, Texas ...
      (comp.lang.perl.misc)