Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, I wanted to know how to determine the encoding of a file which was uploaded by FTP. I found the thread /newbie/47637-how-check-encoding-text.html which points to the right information (by ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    2

    Display encoding of file - more info


    Hello,

    I wanted to know how to determine the encoding of a file which was uploaded by FTP. I found the thread /newbie/47637-how-check-encoding-text.html which points to the right information (by using the command file) but it doesn't help me in my case. Take a look yourself:

    Code:
    # file testutf8.php
    testutf8.php: PHP script text
    As you see, Linux (Debian Lenny in my case) detects the file as PHP script text because of the code within the file (that's my guess at least).
    Is there another way to check how this file was encoded?

    thanks in advance for your help!

  2. #2
    Just Joined!
    Join Date
    Jan 2011
    Posts
    2
    Well it might sound stupid, but by releasing the PHP Code Start and end (<?php and ?>) the file is being recognized as text file again and the encoding is shown now:
    Code:
    file testutf8.php
    testutf8.php: UTF-8 Unicode English text, with CRLF line terminators
    If anyone has another idea, this will be appreciated.

Posting Permissions

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