Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-30-2013, 12:12 PM
|
#1
|
Member
Registered: May 2009
Distribution: Slackware64-14.1
Posts: 138
Rep:
|
Diverses encoding of text files in mirrors Slackware-current
I notice that the files inside Slackware mirrors directories have different encoding for the text files there, is there any reason for this? Or it doesn't matters?
I did this check:
Code:
bash-4.2$ ls *.txt | file --mime-encoding *.txt
ChangeLog.txt: iso-8859-1
bash-4.2$ ls *.TXT | file --mime-encoding *.TXT
BOOTING.TXT: us-ascii
CHANGES_AND_HINTS.TXT: us-ascii
COPYRIGHT.TXT: us-ascii
CRYPTO_NOTICE.TXT: us-ascii
FILELIST.TXT: us-ascii
PACKAGES.TXT: unknown-8bit
README_CRYPT.TXT: us-ascii
README_LVM.TXT: us-ascii
README_RAID.TXT: iso-8859-1
README.TXT: us-ascii
README_UEFI.TXT: us-ascii
SPEAK_INSTALL.TXT: us-ascii
SPEAKUP_DOCS.TXT: us-ascii
UPGRADE.TXT: us-ascii
|
|
|
10-30-2013, 01:16 PM
|
#2
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,374
Rep: 
|
Well, I don't know how it's actually possible to determine the encoding of these files as the characters in them are all part of US-ASCII, which is of course 8-bit and a subset of iso-8859-1 (and also a subset of UTF-8, by the way).
Anyhow, that doesn't matter at all, IMO.
|
|
|
10-30-2013, 03:21 PM
|
#3
|
Member
Registered: May 2009
Distribution: Slackware64-14.1
Posts: 138
Original Poster
Rep:
|
@Didier Spaier: the command line "file" shows the file type, I did another check using the "file" command at Slackware's mirror folder, filtering text files:
Code:
bash-4.2$ file * | grep text
ANNOUNCE.14_1: ASCII text
BOOTING.TXT: ASCII text, with CRLF line terminators
ChangeLog.txt: ISO-8859 text
CHANGES_AND_HINTS.TXT: ASCII text, with CRLF line terminators
CHECKSUMS.md5: ASCII text
COPYING: Pascal source, ASCII text
COPYING3: Pascal source, ASCII text
COPYRIGHT.TXT: ASCII text, with CRLF line terminators
CRYPTO_NOTICE.TXT: ASCII text, with CRLF line terminators
FILELIST.TXT: ASCII text
GPG-KEY: ASCII text
PACKAGES.TXT: Non-ISO extended-ASCII text
README_CRYPT.TXT: Pascal source, ASCII text, with CRLF line terminators
README.initrd: ASCII text
README_LVM.TXT: ASCII text, with CRLF line terminators
README_RAID.TXT: ISO-8859 text, with CRLF line terminators
README.TXT: ASCII text, with CRLF line terminators
README_UEFI.TXT: ASCII text
RELEASE_NOTES: ISO-8859 text
Slackware-HOWTO: Pascal source, ASCII text, with CRLF line terminators
SPEAK_INSTALL.TXT: assembler source, ASCII text, with CRLF line terminators
SPEAKUP_DOCS.TXT: C source, ASCII text, with CRLF line terminators
UPGRADE.TXT: ASCII text, with CRLF line terminators
Last edited by neymac; 10-30-2013 at 03:38 PM.
|
|
|
10-30-2013, 03:48 PM
|
#4
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,374
Rep: 
|
Quote:
Originally Posted by neymac
@Didier Spaier: the command line "file" shows the file type, I did another check using The "file" command at Slackware's mirror folder, filtering text files:
|
That simply shows that algorithm used by "file" to determine the file type is not perfect, so you should not trust it blindly.
More specifically there is in general no way to determine a file's encoding with certainty so the algorithm should include a bit of heuristic and assumptions, that can succeed or fail.
For instance, we have man pages with various encodings, and all you can do sometimes is change value of GROFF_ENCODING before running "man" till the page be properly displayed
Last edited by Didier Spaier; 10-30-2013 at 04:21 PM.
|
|
|
All times are GMT -5. The time now is 06:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|