PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.html > Re: Character encoding
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Re: Character encoding

Réponse
 
LinkBack Outils de la discussion
Vieux 26/04/2008, 12h53   #1 (permalink)
Martin Honnen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Character encoding

Mambo Bananapatch wrote:
> I'm preparing a site for a client which includes several pages
> containing Cyrillic characters. I used the UTF-8 charset, but the
> Cyrillic characters appeared as question marks (and, oddly, some
> Chinese characters as well.) I tried every Cyrillic charset I could
> find and nothing worked.



> So: a) what exactly did Dreamweaver do, and b) how could I have hand-
> coded whatever it is?


Well it all depends on what exactly you do when you say "I used the
UTF-8 charset" or "I tried every Cyrillic charset"? Have you used an
editor that supports saving as UTF-8 (or a Cyrillic charset) and have
you used it so that it saved your documents as UTF-8 (or a Cyrillic
charset)? That is all what you need to do to ensure your files are
properly encoded. Then, when serving them over HTTP you need to make
sure the server sends a HTTP Content-Type response header indicating the
used charset as a paramter e.g.
Content-Type: text/html; charset=UTF-8

--

Martin Honnen
http://JavaScript.FAQTs.com/
  Réponse avec citation
Vieux 28/04/2008, 04h00   #2 (permalink)
Paul Gorodyansky
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Character encoding

Hello!

You did not really answer Martin's question - what did you do _before_
you decided to use Dreamweaver.
On a non-Russian OS one can get question marks in many cases, for
example:
- typing in an editor such as Notepad and save as "ANSI", that is, in
a character set encoding = system code page
- using copy/paste between Unicode and not-Unicode programs
- converting to UTF-8 without explicitely providing source encoding
and thus system code page is assumed
- etc.

You may want to read some explanations on my site:
- section "for developers: Cyrillic (Russian) in HTML"
- section "for developers: Cyrillic (Russian) in Multilingula HTML -
UTF-8"
- chapter "Copy/Paste; Word, .TXT" in the section
"Unicode and Cyrillic"



--
Regards,
Paul
http://RusWin.net
  Réponse avec citation
Vieux 28/04/2008, 15h54   #3 (permalink)
Andreas Prilop
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Character encoding

On Sun, 27 Apr 2008, Mambo Bananapatch wrote:

> if I were to
> hand-code a page with Cyrillic characters, and didn't have access to
> Dreamweaver, how would I encode each file?


You do not write with a pencil, do you? You have some editor
(word-processor, etc.) on some operating system on some computer.
We don't know what they are - but you know. Your editor saves
files in some character set, such as

MacCyrillic
http://www.unics.uni-hannover.de/nhtcapri/cyrillic.mac

ISO-8859-5
http://www.unics.uni-hannover.de/nht...cyrillic.html5

Windows-1251
http://www.unics.uni-hannover.de/nhtcapri/cyrillic.win

Unicode UTF-8
http://www.unics.uni-hannover.de/nht...gual1#cyrillic

> And why must I encode each
> file, in addition to including the UTF-8 Content-Type response
> header?


I don't understand what this question means.

--
Top-posting.
What's the most irritating thing on Usenet?
  Réponse avec citation
Vieux 01/05/2008, 19h29   #4 (permalink)
David Trimboli
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Character encoding

Andreas Prilop wrote:
> On Sun, 27 Apr 2008, Mambo Bananapatch wrote:
>
>> if I were to hand-code a page with Cyrillic characters, and didn't
>> have access to Dreamweaver, how would I encode each file?

>
>> And why must I encode each file, in addition to including the UTF-8
>> Content-Type response header?

>
> I don't understand what this question means.


I wonder if Mambo is confusing file encoding with an http-equiv
declaration in a file.

Mambo, when you save a text file, you're not actually saving letters;
you're saving numbers that correspond to letters. 65="A", and so on.
(Well, yeah, it's actually saved in bits, which are actually electrical
charges...) Your text editor and my browser know how to turn those
numbers into letters to display the file. This mapping of characters to
numbers is the file's "encoding." There are many standard encodings. In
order for my browser to read you file, it needs to know which encoding
you've used; it needs to know what scheme you used to translate letters
into numbers, so that it can use the same scheme to turn numbers back
into letters.

Normally the browser learns what encoding to read by the server's HTTP
headers. An http-equiv declaration in an HTML file is a way to override
a server's content-type (encoding). You only use this if your server
isn't serving files with the correct content-type.

If I'm wrong and you already knew this stuff, I apologize.

--
David
Stardate 8333.3
  Réponse avec citation
Vieux 01/05/2008, 21h02   #5 (permalink)
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Character encoding

On 2008-05-01, David Trimboli <david@trimboli.name> wrote:
[...]
> Normally the browser learns what encoding to read by the server's HTTP
> headers. An http-equiv declaration in an HTML file is a way to override
> a server's content-type (encoding).


It doesn't override it-- if both are present, the server header wins.

> You only use this if your server isn't serving files with the correct
> content-type.


Yes, or because you're using file:// urls during development.
  Réponse avec citation
Vieux 02/05/2008, 14h00   #6 (permalink)
Andreas Prilop
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Character encoding

On Thu, 1 May 2008, David Trimboli wrote:

> An http-equiv declaration in an HTML file is a way to override
> a server's content-type (encoding).


No, it is not. See
http://www.unics.uni-hannover.de/nht...a-http-equiv.1
http://www.unics.uni-hannover.de/nht...a-http-equiv.2

--
Bugs in Internet Explorer 7
http://www.unics.uni-hannover.de/nhtcapri/ie7-bugs
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 15h47.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12667 seconds with 14 queries