Character encoding
François Patte
francois.patte at math-info.univ-paris5.fr
Sun Sep 7 08:28:46 UTC 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le 07.09.2008 04:39, Adil Drissi a écrit :
> Hi,
>
> Thank you for your answer. I want to use this in my personal
> computer. Can you give me the name of the variable please? Say I will
> set that variable to UTF-8 in /etc/profile, do you think that vim
> will always save my files in utf-8 format?
First: what is the result of this command on your computer:
echo $LANG
>
> Another thing, a lot of editors allow to choose the text encoding
> format, and that what i want to be set by default to utf-8. I know
> that in my html code i have to set manually.
There is a little confusion here: the way a text editor encore the
characters and the language you want to type with your text editor have
(almost) no relation together: you can type html text in latin1 or in
utf8....
>>
>> In some file systems it's possible to specify the character
>> encoding of a file as an attribute, but I've never seen it used.
>> HTML can contain a meta tag that specifies the encoding, like this:
>>
>>
>> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
I don't understand what is meant here: this tag is for server use, not
for the text editor used to edit the html file.
>>> o is there a way to convert this file to UTF-8
>> Once you know the current encoding, transcoding won't be a big
>> problem. If the encoding is specified in the file, such as in a
>> meta tag, then you'll have to change that too.
iconv -f <source encoding> -t <target encoding> your-file
example: convert from latin1 to utf8:
iconv -f latin1 -t utf8 your-file
- --
François Patte
UFR de mathématiques et informatique
Université Paris Descartes
45, rue des Saints Pères
F-75270 Paris Cedex 06
Tél. +33 (0)1 44 55 35 61
http://www.math-info.univ-paris5.fr/~patte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFIw5C9dE6C2dhV2JURAtVSAJ0VVaPae3DM7pCOOAT/2YsbBWI6RgCfdAFk
yQghI8LnKC2WnqLKsY+MLtc=
=dUWA
-----END PGP SIGNATURE-----
More information about the fedora-list
mailing list