开发者

JEditorPane saves HTML using entities instead diacritics

I have a file, containing czech text common file split to two lines:

<html>
<head>
    <meta http-equiv="contet-type" content="text/html; charset=UTF-8"/>
</head>
<body>
    <p>Běžný</p>
    <p>soubor</p>
</body>
</html>

When I load this file to JEditorPane using HTMLEditorKit and then save it (like having it edited), the underlying model (HTML code) is changed to:

<html>
<head>
    <meta http-equiv="contet-type" content="text/html; charset=UTF-8"/>
</head>
<body>
    <p style="margin-top: 0">B&#283;&#382;n&#253;</p>
    <p style="margin-top: 0">soubor</p>
</body>
</html>

Is there some way to get out of margins and entities? Must I inevitably o开发者_开发问答verride some methods of HMLEditorKit?

PS: Is there some another embedable (and free) simple Java HTML (WYSIWYG-like) editor? But I need to handle some special tags from my own XML-namespace. (Ideally HTML 4.0 compliant.)


Please use Net Beans IDE 7.0.

Downloads free http://netbeans.org/downloads/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜