Re: Character encoding



-----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-----

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines



Relevant Pages

  • Re: Character encoding
    ... The tag in html is must of course. ... I can code a bash script that can convert from us-ascii to utf-8 for all the files of my website but for the files that don't show the current encoding i don't know what to do. ... There is a little confusion here: the way a text editor ...
    (Fedora)
  • Re: Cyrillic characters in VS2005
    ... Do you have another editor to recommend for HTML with cyrillic characters (or generally non ANSI characters)? ... From what I know there is no way to associate a certain encoding to a certain file, so that you don't have to do this encoding selections every single time. ...
    (microsoft.public.dotnet.framework)
  • Re: Why is ASP.NET changing character encoding of documents?
    ... My default encoding in web.config was iso-8859-1. ... The web.config setting takes precedence over the meta tag. ... >> The below html validates correctly on w3.org's html validator when the file ... >> error below from the validator. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: requestEncoding = "ISO-8859-1"
    ... I placed the META tag in the HTML form file. ... Sorry - how does one encode them physicially using UTF-8 ... I need to pick an encoding that is capable of representing the character 'ö' like UTF-8 or ISO-8859-1. ... But of course one thing always remains true: You must not declare in your HTML page's META tag an encoding that's different from the one you used to save the file. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: requestEncoding = "ISO-8859-1"
    ... "Mark" is far to bland. ... I placed the META tag in the HTML form file. ... I need to pick an encoding that is capable of representing the ...
    (microsoft.public.dotnet.framework.aspnet)