This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 7814 - allow editing unicode documents
Summary: allow editing unicode documents
Status: RESOLVED LATER
Alias: None
Product: Amaya
Classification: Unclassified
Component: Editing (show other bugs)
Version: 11.2
Hardware: PC Linux
: P2 major
Target Milestone: ---
Assignee: Vatton
QA Contact: Vatton
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-05 19:43 UTC by Jeff Fortin
Modified: 2009-10-07 01:59 UTC (History)
5 users (show)

See Also:


Attachments
sample (5.91 KB, text/html)
2009-10-05 19:43 UTC, Jeff Fortin
Details

Description Jeff Fortin 2009-10-05 19:43:53 UTC
Created attachment 771 [details]
sample

This is with amaya 0.11.3.

Open the sample attached document (that I wrote in unicode with gedit and bluefish). Amaya will mess up the accents, and saving the document will result in the encoding being overridden and all messed up.

Unicode should prevail.
Comment 1 Vincent Quint 2009-10-06 07:25:35 UTC
As the file contains no DOCTYPE declaration, nor any XML declaration, not even a <html> tag, it is considered as a HTML 4 document. As there is no indication of the encoding, it is supposed ISO Latin-1, the default encoding for HTML. Any compliant well client will present this document in the same way as Amaya.

To solve the problem, I suggest you download the document in Amaya (the accented will display badly for the reason explain above). Then use command File / Read_as and select option Unicode (UTF-8). Amaya will then display the document correctly and add the necessary markup to clearly indicate that it is UTF-8 encoded. Then save the document.
Comment 2 Jeff Fortin 2009-10-06 12:19:27 UTC
There is no "File > Read as" menu item (or anything ressembling that in French).

And if there was one, perhaps it would be good if there was also an option in the "View" menu? Something like "View > Text encoding". The reasoning behind this is that all major browsers present the option that way, and it would be more discoverable for those who wish to switch encoding "after the fact".
Comment 3 Vatton 2009-10-06 15:38:47 UTC
(In reply to comment #2)
> There is no "File > Read as" menu item (or anything ressembling that in
> French).

In French there is a "Lire comme" sub-menu in the "Fichier" menu (entry 4).

> And if there was one, perhaps it would be good if there was also an option in
> the "View" menu? Something like "View > Text encoding". The reasoning behind
> this is that all major browsers present the option that way, and it would be
> more discoverable for those who wish to switch encoding "after the fact".

If I understand your request. You wish that the menu entry "Lire comme" is moved from the "Fichier" menu to the "Affichage" menu?
Comment 4 Vatton 2009-10-06 15:50:47 UTC
(In reply to comment #2)
> There is no "File > Read as" menu item (or anything ressembling that in
> French).

That entry menu is not available in the "Lite" and "Lite+Math_Graphics" profiles.
Comment 5 Jeff Fortin 2009-10-07 01:51:42 UTC
So if I want my non-geek users to be able to edit pages I made (those are pages meant to be included inside a layout by php, so no headers or anything), I have to expect them to use the full/advanced version of amaya with its tons of options? :)

And to answer your second question, yeah, I would somehow recommend having a submenu for that at all times in View instead of requiring that the user does it before even opening the file (through a special open dialog).
Comment 6 Jeff Fortin 2009-10-07 01:59:07 UTC
Oh, I see that the "Read as" is actually a submenu that behaves as a "Switch text encoding" action rather than a "Open a file as ...". Now, I'm a bit unsure about putting it in the View menu in the sense that it does make some sense to have it in File too, but on the other hand, the "View > Text encoding" thing is quite familiar from browsers. Hm.

One thing I'd definitely suggest, though, is to rephrase that menu item to something much clearer, such as "Text encoding", "Set text encoding", or something like that.