UTF-8转换为HTML
大家好,
是否有任何类型的''hiconv''或其他类似unix的转换工具
会将UTF-8转换为HTML(ISO-Latin-1和Unicode)?
数据库输出仅为UTF-8或UTF-16 - 因此几乎每个字符
以^ @开头。
我见过例如
http://aktuell.de.selfhtml.org/artik...64/utf8.htm#a5 as
JavaScript解码器 - 但也许有一个推荐的小帮手,
可以做到:
- 摆脱UTF-8声明,其中拉丁语足够好
- 将其他人转换为最广泛使用的HTML
....甚至ISO-Latin-1 8bits到HTML
? - > & auml;
....也许
EUR - > & euro;
谢谢,
马丁
Hi all,
is there any kind of ''hiconv'' or other (unix-like) conversion tool that
would convert UTF-8 to HTML (ISO-Latin-1 and Unicode)?
The database output is UTF-8 or UTF-16 only - Thus almost every character
starts with ^@.
I''ve seen e.g.
http://aktuell.de.selfhtml.org/artik...64/utf8.htm#a5 as
JavaScript decoder - but maybe there''s a recommended little helper that
could do:
- get rid of UTF-8 declarations where Latin is good enough
- convert others to most widely used HTML
such as Bulgarian and Russian charsets to 
..;
.... or even ISO-Latin-1 8bits to HTML
? -> ä
.... and maybe
EUR -> €
Thanks,
Martin
文章< sl ****************** @ id-685.user.individual.de>,
Martin Trautmann< tr *** @ gmx.de>写道:
In article <sl******************@id-685.user.individual.de>,
Martin Trautmann <tr***@gmx.de> wrote:
大家好,
是否有任何类型的'hiconv'或其他类似unix的转换工具
将UTF-8转换为HTML(ISO-Latin-1和Unicode)?
数据库输出仅为UTF-8或UTF-16 - 因此几乎每个字符都以^ @开头。
我见过例如
http://aktuell.de.selfhtml.org/artik...64/utf8.htm#a5 作为JavaScript解码器 - 但也许有推荐可以做的小帮手:
- 摆脱拉丁语足够好的UTF-8声明
- 将其他人转换为最广泛使用的HTML
>比如保加利亚和俄罗斯的charsets到&#10 ..;
...甚至ISO-Latin-1 8bits到HTML
? - > & auml;
......也许
EUR - > & euro;
Hi all,
is there any kind of ''hiconv'' or other (unix-like) conversion tool that
would convert UTF-8 to HTML (ISO-Latin-1 and Unicode)?
The database output is UTF-8 or UTF-16 only - Thus almost every character
starts with ^@.
I''ve seen e.g.
http://aktuell.de.selfhtml.org/artik...64/utf8.htm#a5 as
JavaScript decoder - but maybe there''s a recommended little helper that
could do:
- get rid of UTF-8 declarations where Latin is good enough
- convert others to most widely used HTML
such as Bulgarian and Russian charsets to 
..;
... or even ISO-Latin-1 8bits to HTML
? -> ä
... and maybe
EUR -> €
只使用UTF-8输出有什么问题?
- -
= Eric Bustad,挪威单身汉程序员
What''s the problem with just using the UTF-8 output as is?
--
= Eric Bustad, Norwegian bachelor programmer
>是否有任何''hiconv''或其他(类似unix)转换工具
> is there any kind of ''hiconv'' or other (unix-like) conversion tool
that
会将UTF-8转换为HTML(ISO-Latin-1和Unicode)?
would convert UTF-8 to HTML (ISO-Latin-1 and Unicode)?
Martin,
HTML4可以是UTF-8;只需将其作为内容类型:text / html;
charset = utf-8。或者在标题中添加一个META标记,
声明它。很久以前HTML仅限于Latin1,但
是历史。 (也许还有比你告诉我们更多的东西?)
无论如何,如果你真的想将Unicode转换为latin1 + html
字符实体,我相信GNU重新编码可以做你想要的:
Martin,
HTML4 can be UTF-8; just serve it as content-type: text/html;
charset=utf-8. Alternatively put a META tag in the header that
declares it as such. Long ago HTML was restricted to Latin1 but that
is history. (Maybe there is more to this than you are telling us?)
Anyway, if you really want to convert Unicode to latin1 + html
character entities, I believe that GNU recode can do what you want:
重新编码utf8..html
Martelestconsidérécomgypère ; delaspéléologiemoderne
Martel est consid& eacute; r& eacute; comme& quot; p& egrave; re& quot; de la
sp& eacute; l& eacute; ologie moderne
(这个例子看起来是否正确取决于这篇文章发生的事情
我和你之间......)
--Phil。
recode utf8..html
Martel est considéré comme "père" de la spéléologie moderne
Martel est considéré comme "père" de la
spéléologie moderne
(Whether that example looks right depends on what happens to this post
between me and you...)
--Phil.