Perl

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • ASCII -> ASCII printable

    7 answers - 172 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all,
    I need convert all ASCII unprintalbe to ASCII printable (if possible)
    according to (), tell me please,
    what should I use/look for.
    Thanks a lot.
  • No.1 | | 250 bytes | |

    Nov 26, 2005, at 19:21, Brano Gerzo wrote:
    I need convert all ASCII unprintalbe to ASCII printable (if possible)
    according to (), tell me please,
    what should I use/look for.
    The string "\033" would be converted to what?
    -- fxn
  • No.2 | | 740 bytes | |

    Xavier Noria [XN], on Saturday, November 26, 2005 at 20:20 (+0100)
    typed the following:


    >I need convert all ASCII unprintalbe to ASCII printable (if possible)
    >according to (), tell me please,
    >what should I use/look for.


    XNThe string "\033" would be converted to what?

    yes, on the first line I wrote "(if possible)", as you guess right,
    this is not possible.
    But for example (I write DEC numbers):
    128 -c
    129 -u
    130 -e
    and so on (http://www.lookuptables.com/)

    So I guess I'm looking for some conversion table, if this is not done,
    I will create one, but never do this before, don't know what to use
    :( hm, maybe tr will help here
  • No.3 | | 990 bytes | |

    Nov 26, 2005, at 20:39, Brano Gerzo wrote:

    Xavier Noria [XN], on Saturday, November 26, 2005 at 20:20 (+0100)
    typed the following:
    --
    I need convert all ASCII unprintalbe to ASCII printable (if
    possible)
    according to (), tell me please,
    what should I use/look for.

    XNThe string "\033" would be converted to what?

    yes, on the first line I wrote "(if possible)", as you guess right,
    this is not possible.
    But for example (I write DEC numbers):
    128 -c
    129 -u
    130 -e
    and so on (http://www.lookuptables.com/)

    So I guess I'm looking for some conversion table, if this is not done,
    I will create one, but never do this before, don't know what to use
    :( hm, maybe tr will help here

    Yeah, looks like you need some kind of conversion table, but I still
    do no understand the problem to solve. Can you be more specific? Do
    you have examples of actual inputs and their corresponding conversions?
    -- fxn
  • No.4 | | 970 bytes | |

    Xavier Noria [XN], on Saturday, November 26, 2005 at 20:53 (+0100)
    thinks about:

    XNYeah, looks like you need some kind of conversion table, but I still
    XNdo no understand the problem to solve. Can you be more specific? Do
    XNyou have examples of actual inputs and their corresponding conversions?

    this is selfexplain: http://www.lookuptables.com/
    when the character is possible to convert to something printable, I
    can write conversion (161 -i), but for example 241 has no printable
    character, so it should be space or nothing.

    As I look to these codes, I found around 36 characters, which I should
    convert.

    And need for this? I'm sending to client some file, but name of
    attachment is created from database. In DB I have iso-8859-1
    characters, which looks ugly (I don't know client's encoding, I don't
    know how to encode filename of attachment), so I just want send
    clear characters
  • No.5 | | 772 bytes | |

    Nov 26, 2005, at 21:03, Brano Gerzo wrote:

    Xavier Noria [XN], on Saturday, November 26, 2005 at 20:53 (+0100)
    thinks about:

    XNYeah, looks like you need some kind of conversion table, but I
    still
    XNdo no understand the problem to solve. Can you be more
    specific? Do
    XNyou have examples of actual inputs and their corresponding
    conversions?

    this is selfexplain: http://www.lookuptables.com/
    when the character is possible to convert to something printable, I
    can write conversion (161 -i), but for example 241 has no printable
    character, so it should be space or nothing.

    , there are not enough details to provide actual code, but I think
    you'll be done with tr///, it is documented in perlop.
    -- fxn
  • No.6 | | 595 bytes | |

    Hi All,
    I am trying to install perl modules locally since I dont have a
    root aceess. I installed a local version of perl. However I
    am having problems installing modules:

    ExtUtils::AutoInstall 0.49 required. Install it from CPAN? [Y/n] y
    Installing ExtUtils::AutoInstall
    Password:

    It asks me for the password when I use MCPAN (perl -MCPAN -e shell) to
    install it.

    this is what my male_pl_arg looks like:

    makepl_arg PREFIX=/ws/ifp-22/scratch/Perl

    INSTALLBIN= /ws/ifp-22/scratch/Perl/bin

    Whats is going wrong ?

    thanks,
    Mandar
  • No.7 | | 960 bytes | |

    Mandar:

    Download the module's source code and install the module manually but
    modify the installation location by providing Makefile.PL the PREFIX=
    argument. i.e.,

    %perl Makefile.PL PREFIX=/your/home/dir
    %make
    %make test
    %make install

    Eric P.
    Sunnyvale, CA

    Sat, 2005-11-26 at 14:18 -0600, Mandar Rahurkar wrote:
    Hi All,
    I am trying to install perl modules locally since I dont have a
    root aceess. I installed a local version of perl. However I
    am having problems installing modules:

    ExtUtils::AutoInstall 0.49 required. Install it from CPAN? [Y/n] y
    Installing ExtUtils::AutoInstall
    Password:

    It asks me for the password when I use MCPAN (perl -MCPAN -e shell) to
    install it.

    this is what my male_pl_arg looks like:

    makepl_arg PREFIX=/ws/ifp-22/scratch/Perl

    INSTALLBIN= /ws/ifp-22/scratch/Perl/bin

    Whats is going wrong ?

    thanks,
    Mandar

Re: ASCII -> ASCII printable


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 4 =
QUESTION ON "Perl"

EMSDN.COM