求助:JEditorPane的getText()方法返回的字符怎么是这样的?输入以下字符(包括中文):
sdf在一枯dsfkl用getText()返回的字符是:
<html>
<head></head>
<body>
sdf在一枯dsfkl
</body>
</html>查javadoc是:When the file is passed to an user agent (JEditorPane) it is converted to the document character set (ISO-10646 aka Unicode). 请高手赐教:如何获得中文的html格式文本:
<html>
<head></head>
<body>
sdf在一枯dsfkl
</body>
</html>
sdf在一枯dsfkl用getText()返回的字符是:
<html>
<head></head>
<body>
sdf在一枯dsfkl
</body>
</html>查javadoc是:When the file is passed to an user agent (JEditorPane) it is converted to the document character set (ISO-10646 aka Unicode). 请高手赐教:如何获得中文的html格式文本:
<html>
<head></head>
<body>
sdf在一枯dsfkl
</body>
</html>
{
writeUTF16Surrogate(c, ch, i, end);
i++ ; // process two input characters
}
else
{
writer.write("&#"); String intStr = Integer.toString((int) c); writer.write(intStr);
writer.write(';');
}看来&#后的数字表示char表示的数字值的十进制表示