UTF-16 encoded HTML
- From: Stephan Zimmermann <s.zimmermann@xxxxxxxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 15:16:50 +0200
Hi all,
I have a HTML file, encoded in UTF-16, which my webbrowsers can display very
well. But when I load the same URL into JEditorPane, I only see some ugly
boxes and other trash.
<code>
JEditorPane ep = new JEditorPane(fileURL);
</code>
I also tried to read the content of the file over an FileInputStream, which
leads to a nice view of the HTML code.
<code>
InputStreamReader in = new InputStreamReader(new
FileInputStream(fileURL.getFile()),"UTF-16");
ep.read(in,"text/html; charset=UTF-16");
</code>
Is there a way to display a UTF-16 encoded HTML file? Or is there another
(easy) way to show (formatted) Information in multiple languages without
using different encodings?
.
- Follow-Ups:
- Re: UTF-16 encoded HTML
- From: Oliver Wong
- Re: UTF-16 encoded HTML
- From: Thomas Fritsch
- Re: UTF-16 encoded HTML
- From: Andrew Thompson
- Re: UTF-16 encoded HTML
- Prev by Date: Re: How can I "glue" JDialog to an owning JFrame ?
- Next by Date: Re: UTF-16 encoded HTML
- Previous by thread: JMenu is covert by an external application
- Next by thread: Re: UTF-16 encoded HTML
- Index(es):
Relevant Pages
|
|