in reply to how to get exactly same text from a file

read perlunitut: Unicode in Perl#I/O flow (the actual 5 minute tutorial),Encode::Detective, Encode::Guess
  • Comment on Re: how to get exactly same text from a file

Replies are listed 'Best First'.
Re^2: how to get exactly same text from a file
by Anonymous Monk on Nov 26, 2012 at 13:44 UTC
    Thanks but it didn't solve my proble. Can you specify , how to convert the garbled character mentioned above into it's respective character.
      Which encoding is used for the text in your source file? Which encoding would you like to use for output? If you just output the content of your inputfile (using cat, or, if you run Windows, using TYPE), does it look right?

      -- 
      Ronald Fischer <ynnor@mm.st>

      Thanks but it didn't solve my proble. Can you specify , how to convert the garbled character mentioned above into it's respective character.

      It wasn't meant to solve your problem, it is meant to teach you how stuff works, and what you need to do to solve your problem

      "garbled characater" is a something you should avoid when trying to get help, you should talk about bytes, or better yet, perl code

      perl -MData::Dump -MFile::Slurp -e " dd scalar read_file shift, { qw/ binmode :raw / }; " AnyKindOfInputFile > ThatFilesBytesAsPerlCode.pl