Operating System - Linux
1753269 Members
4885 Online
108792 Solutions
New Discussion юеВ

is there any encoding asscoiated with file ceratd on LINUX

 
skt_skt
Honored Contributor

is there any encoding asscoiated with file ceratd on LINUX


RHEL AS 3

is there any encoding standards associated (like ANSI, unicode,utf-8) with files creaeted on LINUX by deafult?


So is there a way i can check from LINUX side what is the encoding associated with the file?
6 REPLIES 6
Goran┬аKoruga
Honored Contributor

Re: is there any encoding asscoiated with file ceratd on LINUX

Hello.

Do you mean with file names or file content?

For filenames some filesystems support an option to specify one, for contents it's up to each application.

There are tools that try to guess it based on content, but that's just a guess.

Regards,
Goran
sen_ux
Valued Contributor

Re: is there any encoding asscoiated with file ceratd on LINUX

RedHat use UTF-8 by default and it again depends on application/programme.

Thanks
Matti_Kurkela
Honored Contributor

Re: is there any encoding asscoiated with file ceratd on LINUX

In unix-like systems, a file is just a string of bytes: there is no universal meta-data that would describe the content of any file in a standardized way.

Most modern programs get their character set definitions from the locale configuration system: run "locale" to see the current settings.

The default locale can be set at the installation time, but each user can configure his/her own shell environment to use a different locale, if necessary. The default locale is configured in the /etc/sysconfig/i18n file in RHEL.

Some old, locally-produced or very simple programs may have hard-coded defaults or their own configuration system for character encodings.

Some file formats may have standardized encodings: for example, HTML is generally assumed to be ISO-8859-1 unless specified otherwise (using a DOCTYPE or a META HTTP-EQUIV tag). XML is usually assumed to be UTF-8 unless otherwise specified.

UTF-8 seems to be the currently preferred character encoding in the Unix/Linux world.

MK
MK
skt_skt
Honored Contributor

Re: is there any encoding asscoiated with file ceratd on LINUX


i tested couple of files with iconv(from iso88591 to utf8) and transffered to windows. test proved that there is no diff in exisisting format than utf unless there are special char involved on the source file. If there are special char then the file property report that as UTF8 from windows. SSOUNDS LIKE 7 bit char remain same on both format.
Hakki Aydin Ucar
Honored Contributor

Re: is there any encoding asscoiated with file ceratd on LINUX

You need to use crypt command which provides very simple file encryption.

like;

$ cat my.txt | crypt > my.cpy

Output:

Enter key: . . .

if your OS do not have, probably you find in GNU sites.
skt_skt
Honored Contributor

Re: is there any encoding asscoiated with file ceratd on LINUX

we are not dealing with encryption here. But good to know about crypt