emacs-devel
[Top][All Lists]
Advanced

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

Re: Problem with national characters in XHTML


From: Lennart Borgman
Subject: Re: Problem with national characters in XHTML
Date: Wed, 28 Sep 2005 16:05:03 +0200
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Kenichi Handa wrote:

In article <address@hidden>, LENNART BORGMAN <address@hidden> writes:

I have run into a problem with swedish national characters in an XHTML 
document. The header of the document is like this:
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
           "http://www.w3.org/TR/REC-html40/loose.dtd";>
 <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en">

The swedish character ä looks like \344 in CVS Emacs (2005-09-23). It looks ok 
in Internet Explorer, but not in Firefox. Looking at the file with Notepad also 
shows the swedish characters as expected.

I would be glad for some hints and pointers! I am using nxml-mode if that 
matters here.

Could you please send me the whole file?
I have attached to test files in XHTML, one user utf-8 in the header and the other iso-8859-1. Those files tells what is displayed in IE and Firefox and how the swedish character ä was entered (though I guess some info might be missing for the experts here).

I find this a bit confusing still. What character is entered by Emacs when I type ä on my swedish keyboard? When I look at the character ä in Emacs with (following-char) it in both test files returns 2276. Is that what I would expect in the iso-8859-1 test file? (It starts with <?xml version="1.0" encoding="iso-8859-1"?>)

Testing National Characters in Emacs, IE 6.0 SP 1 and Firefox 1.0.7

Using GNU Emacs 22.0.50.1 (i386-mingw-nt5.0.2195) of 2005-09-28

The header in this file contains <xml version="1.0" encoding="iso-8859-1"?>

Character and context Internet Explorer Firefox
This is the swedish character ä entered in a new iso-8859-1 file. Correct Correct
This is swedish ä entered in a new utf-8 file.

Compare this with using UTF-8

Testing National Characters in Emacs, IE and Firefox

Using GNU Emacs 22.0.50.1 (i386-mingw-nt5.0.2195) of 2005-09-28

The header in this file contains <xml version="1.0" encoding="utf-8"?>

Character and context Internet Explorer Firefox
This is swedish ä entered in a new utf-8 file. Wrong Correct
This is swedish ä entered after opening the file again. Wrong Correct
This is the swedish character ä entered in a new iso-8859-1 file.

Compare this with using ISO-8859-1

Testing Emacs display

If <xml version="1.0" encoding="utf-8"?> is changed to use 8859-1 Emacs still displays the entered characters as they were correct.

Conclusion

Emacs and Firefox seems to handle this correctly. However due to bugs in Internet Explorer only ISO-8859-1 currently can handle both browsers.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]