check whether file is ascii or ebcdic

Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default check whether file is ascii or ebcdic

    Hi

    How do I check whether a file is in ebcdic or ascii format ?

    Thanks,
    Nitish


    Nntp.Perl.Org Guest

  2. Similar Questions and Discussions

    1. Remove ascii code from a certain position in file
      I'm very familiar with the tr command and use it a lot when removing certain characters from files, but my situation today is involving needing to...
    2. is this whole file EBCDIC?
      is this whole file EBCDIC? Or just the text part.? Thanks Record length is 114 Field between columns 10 and 14 is a packed-decimal number...
    3. How do I make AI file print as ASCII?
      Some of my Illustrator files print fine while other print out as garbage text. In Quark I can change the file type from Binary to ASCII. Can this be...
    4. ASCII and EBCDIC Tablespaces and performance on z/OS
      We have to maintain the same collating sequence between an oracle database on NT and a db2 on z/OS. FOr this, we are planning to use an ascii...
    5. How to connect to ASCII database file via ADODB?
      How to connect to ASCII database file via ADODB? Hello, I have received an ASCII database file. I would like to connect & read the ASCII file...
  3. #2

    Default Re: check whether file is ascii or ebcdic

    Nntp.Perl.Org wrote:
    > Hi
    >
    > How do I check whether a file is in ebcdic or ascii format ?
    >
    > Thanks,
    > Nitish
    >
    >
    perldoc -f -x

    That tells me how to find if a file is ascii text

    if(-T $file) {
    print "$file is an ascii text file \n";
    } else {
    print "Not an ascii text file \n";
    }


    Ramprasad A Padmanabhan Guest

  4. #3

    Default Re: check whether file is ascii or ebcdic

    > >
    > > How do I check whether a file is in ebcdic or ascii format ?
    > >
    > > Thanks,
    > > Nitish
    > >
    > >
    > perldoc -f -x
    >
    > That tells me how to find if a file is ascii text
    >
    > if(-T $file) {
    > print "$file is an ascii text file \n";
    > } else {
    > print "Not an ascii text file \n";
    > }
    is there any way to tell if a file is ebcdic text ?


    Nntp.Perl.Org Guest

  5. #4

    Default Re: check whether file is ascii or ebcdic

    > > Hi
    > >
    > > How do I check whether a file is in ebcdic or ascii format ?
    > >
    > > Thanks,
    > > Nitish
    > >
    > >
    > perldoc -f -x
    >
    > That tells me how to find if a file is ascii text
    >
    > if(-T $file) {
    > print "$file is an ascii text file \n";
    > } else {
    > print "Not an ascii text file \n";
    > }
    >
    Is there any way to explicitly check if a file is EBCDIC ?


    Nntp.Perl.Org Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139