Importing HTML table into OO Calc as UTF8 without converting to entities

岁酱吖の 提交于 2019-12-12 08:14:30

问题


I have a problem when opening a HTML table in OpenOffice or LibreOffice if it contains UTF8 extended characters like ÅÄÖåäö.

When opening the table into M$ Excel it works as intended but I can't make OO do the same thing.

By converting all extended characters to its HTML entity eqivalent Å etc. it works but it would be nice to get the correct characters directly.

Is there anyone who knows what I should do?

The following content I have in a file called excelsample.xls and if I open that with OO Calc it will not look nice.

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta http-equiv="content-type" content="application/vnd.ms-excel" charset="UTF-8">
    <meta charset="UTF-8">
</head>
<body>
    <table>
        <tr>
            <td>Prawn sandwich</td><td>Räksmörgås</td>
        </tr>
    </table>
</body>
</html>

回答1:


Your meta tag is malformed and OO doesn't probably recognize the html5 charset tag.

So fix it with:

<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">


来源:https://stackoverflow.com/questions/14199428/importing-html-table-into-oo-calc-as-utf8-without-converting-to-entities

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!