Skip to main content

JavaHelp 2.0 - which standards are supported?

10 replies [Last post]
chrish
Offline
Joined: 2006-05-05
Points: 0

Which W3 standards does JavaHelp 2.0_01 support? I've had terrible luck trying to search the web for this information.

As far as I know right now, it supports:

* HTML 3.2 - welcome to 1997!
* CSS - 1 or 2?
* ECMASCript (aka JavaScript) - no support at all

I'd like to think that JavaHelp 2.0 supports HTML 4.01 or (better) XHTML 1.0 and CSS 2, but I'd like to know before I finish my XML translator. :-)

Thanks!

- chrish

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
brinkley
Offline
Joined: 2003-06-06
Points: 0

It's really what does the JDK support. Right now it's
HTML 4.0 plus and minus (I'm not totally sure on the pluses and minus)., CSS 1, no scripts.

Binky

chrish
Offline
Joined: 2006-05-05
Points: 0

One of the minuses is apparently HTML 4's full set of entities; there are a [i]lot[/i] of unsupported entities... everything except the basic Latin-1 entities.

Also, it doesn't display XHTML properly; ">" shows up in the window when the end of an empty tag is encountered (such as "").

Also, the XML parser used to load the helpset, map, and TOC files can't handle ' as a quote character for attributes.

chrish
Offline
Joined: 2006-05-05
Points: 0

Found another good one:

JavaHelp apparently can't handle UTF-8 encoded pages; it displays ISO-8859-1 regardless of what the character encoding is, and there's no way to set it. Despite Java being Unicode-aware.

Yes, I'm getting a bit frustrated with this. I was expecting more support for web standards and features that have been in Java since 1.0...

Roger Brinkley

java-help@JAVADESKTOP.ORG wrote:
> Found another good one:
>
> JavaHelp apparently can't handle UTF-8 encoded pages; it displays
> ISO-8859-1 regardless of what the character encoding is, and there's
> no way to set it. Despite Java being Unicode-aware.
>
> Yes, I'm getting a bit frustrated with this. I was expecting more
> support for web standards and features that have been in Java since
> 1.0...

UTF-8 is a supported encoding. See

http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html

All the search databases are converted to UTF-8 so I know that the
conversions work.

Is it possible that your defining the encoding incorrectly?

Binky

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

chrish
Offline
Joined: 2006-05-05
Points: 0

I was putting this in the of the HTML files:

but JavaHelp was displaying the UTF-8 bytes as individual characters, probably in the default Windows encoding (that's the platform I'm working on).

Unless there's a way to specify the character encoding in the helpset file or something that I missed...

- chrish

Roger Brinkley

java-help@JAVADESKTOP.ORG wrote:
> I was putting this in the of the HTML files:
>
>
>
> but JavaHelp was displaying the UTF-8 bytes as individual characters,
> probably in the default Windows encoding (that's the platform I'm
> working on).
>
> Unless there's a way to specify the character encoding in the helpset
> file or something that I missed...
>

Let me see if I can get someone on the Swing team or the I18N team to
answer this. It looks correct to me.

Binky

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

idk
Offline
Joined: 2005-01-12
Points: 0

Swing can handle

fine

Could you test your html file with javax.swing.JEditorPane ?

-- FileView.java --
import javax.swing.*;

public class FileView {
static JEditorPane editor;
static JFrame frame;
static String url;
static public void main(String[] args) {
frame = new JFrame("UrlView");
editor = new JEditorPane();
url = args[0];
SwingUtilities.invokeLater(
new Runnable() {
public void run() {
editor.setEditable(false);
try {
editor.setPage(url);
} catch (Exception e) {

}
frame.getContentPane().add(editor);
frame.pack();
frame.setVisible(true);
}
});
}
}
--

> javac FileView.java

> java FileView url

Thanks,
Igor

chrish
Offline
Joined: 2006-05-05
Points: 0

It appears to suffer the same problem; it's ignoring the charset in the specified ContentType tag in favour of ISO-8859-1.

You can see it by pointing the FileView at http://chrish.dnsalias.org:8080/utf8test.html.

It works properly if I add this before the editor.setPage(url); statement:

editor.setContentType( "text/html; charset=UTF-8" );

It's ignoring the charset specified in the document.

- chrish

idk
Offline
Joined: 2005-01-12
Points: 0

The html file is not correct.
--



--

is missing

try




Thanks,
Igor

chrish
Offline
Joined: 2006-05-05
Points: 0

[Sound of hand smacking forehead...]

I can't believe that was the problem; I'm usually quite careful about producing valid markup.

Works like a charm now, thanks for pointing out my stupid error!

- chrish