determine encoding from headers

Bug #498745 reported by Kamil
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gedit
Won't Fix
Wishlist
gedit (Ubuntu)
Triaged
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gedit

I type code:
'<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" dir="ltr">
</html>'

and it is recognized as HTML, '<?xml version="1.0" encoding="utf-8" standalone="no"?>' is not highlighted, just like '<?xml-stylesheet type="..."?>' when I add this too. This is a bug because, the code is not HTML, but XHTML, so of course XML too. This is annoying, because of not highlighting '<?xml version="1.0" encoding="utf-8" standalone="no"?>' and '<?xml-stylesheet type="..."?>'.

ProblemType: Bug
Architecture: i386
Date: Sun Dec 20 11:24:40 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/gedit
Package: gedit 2.28.0-0ubuntu2
ProcEnviron:
 LANG=pl_PL.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: gedit
Uname: Linux 2.6.31-17-generic i686

Revision history for this message
Kamil (winner5) wrote :
Revision history for this message
Pedro Villavicencio (pedro) wrote :

I've used the same example here and saved the file as .xhtml ; the xml part is highlighted here, could you take an screenshot of what you're seeing there? with which file extension are you saving the file?

Changed in gedit (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Kamil (winner5) wrote :

Firstly, I open new gedit window, type:
'<?xml version="1.0" encoding="utf-8" standalone="no"?>'
ans click Ctrl+S, I save it as 'proba.xht' (polish word, nvm), then I put this below current content:
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" dir="ltr">
 <head>
  <title>Document</title>
  <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=&quot;utf-8&quot;"/>
  <meta http-equiv="Content-Language" content="pl"/>
 </head>
 <body>
  <div>
   <p/>
  </div>
 </body>
</html>'
I click Ctrl+S, and then mall caption on the status bar turns 'HTML'.

Revision history for this message
Kamil (winner5) wrote :

The image was cut to be smaller,

Revision history for this message
Pedro Villavicencio (pedro) wrote :

confirming with those steps, will have a look upstream thank you Kamil.

Changed in gedit (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Pedro Villavicencio (pedro) wrote :

that's likely to be known upstream as per bug https://bugzilla.gnome.org/show_bug.cgi?id=163999 ; gedit doesn't recognize the encoding by the headers (xml in this case) that's why it's showing the issue here, linking that report, thanks.

summary: - XML code is recognized as HTML, <?xml version="1.0" encoding="utf-8"?>
- not highlighted.
+ determine encoding from headers
Changed in gedit (Ubuntu):
status: Confirmed → Triaged
Changed in gedit:
importance: Unknown → Wishlist
status: Unknown → Confirmed
Changed in gedit:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.