Re: Character encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi François,

Thank you for your answer.
the result of echo $LANG is the following: en_CA.UTF-8

I want the web pages i develop to fully support french. The tag in html is  must of course. But i want the file to be encoded in UTF-8.

Before when i was using windows i was an editor that allows to save in utf-8. Now after modifying some files using vi, vim or kate, i am finding that some files are encoded in us-ascii, some others don't show the type of encoding, so i'm really lost.

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.

Please help

--- On Sun, 9/7/08, François Patte <francois.patte@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> From: François Patte <francois.patte@xxxxxxxxxxxxxxxxxxxxxxxx>
> Subject: Re: Character encoding
> To: adil.drissi@xxxxxxxxx, "Community assistance, encouragement, and advice for using Fedora." <fedora-list@xxxxxxxxxx>
> Date: Sunday, September 7, 2008, 8:28 AM
> -----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

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux