htmentities没有翻译德语“umlaute” [英] htmentities does not translate german "umlaute"

查看:49
本文介绍了htmentities没有翻译德语“umlaute”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我目前遇到htmlentities和德语umlaute的问题。

将我的脚本移到新盒子后(来自Linux到FreeBSD)我不得不

看到htmlentities不再工作了。

BSD服务器(FreeBSD 5.1.2)运行PHP 4.3.9和Apache 2如同Linux服务器确实/做过的那样。


我也尝试用ISO 8859-1定义charset作为
$ b中的第三个参数$ b htmlentities但没有结果。


如何解决这个神秘痛苦的任何建议?


Thx

Rob

Hi all,

I currently face a problem with htmlentities and german "umlaute".
After moving my scripts to a new box (from Linux to FreeBSD) I had to
see that htmlentities is not working anymore.
The BSD Server (FreeBSD 5.1.2) runs PHP 4.3.9 and Apache 2 as well as
the Linux Server does/did too.

I also tried defining the charset with ISO 8859-1 as 3rd parameter in
htmlentities but without a result.

Any suggestions how to solve this mysterious misery?

Thx
Rob

推荐答案

.oO(Robert Zierhofer)
.oO(Robert Zierhofer)
我目前面临着htmlentities和德国的问题; umlaute"。
I currently face a problem with htmlentities and german "umlaute".




另一个问题:你为什么要翻译它们?


Micha



Another question: Why do you want to translate them?

Micha


Michael Fesser写道:
Michael Fesser wrote:
.oO(Robert Zierhofer)

.oO(Robert Zierhofer)

我目前遇到了htmlentities和德语umlaute的问题。
I currently face a problem with htmlentities and german "umlaute".



另一个问题:你为什么要翻译它们?

Micha


Another question: Why do you want to translate them?

Micha



好​​吧,我会说HTML等价物在
$中更可靠b $ b浏览器显示的条件比?,?和ü'的。

你不同意:)


Well, I would say that the HTML equivalents are a bit more reliable in
terms of browser display than ?, ? and ü''s.
Wouldn''t you agree :)


.oO(Robert Zierhofer)
.oO(Robert Zierhofer)
Michael Fesser写道:
Michael Fesser wrote:
另一个问题:你为什么要翻译它们?
Another question: Why do you want to translate them?


好吧,我会说HTML等价物是浏览器显示方面的可靠性比?,?和ü'的。
你不同意吗:)。


Well, I would say that the HTML equivalents are a bit more reliable in
terms of browser display than ?, ? and ü''s.
Wouldn''t you agree :)




号我把我的文件交给ISO-8859-1(Latin-1 ),其中包含

元音符和其他特殊元素。字符。我在

机器上可用的所有浏览器都能够处理。如果你以UTF-8的价格交付你的文件,你就不用再照顾了。


我不认为使用实体是非常必要,除了& lt;,& gt;,

& quot;和& amp;有时。这就是为什么我从未使用过htmlentities(),

但是htmlspecialchars()。


Micha



No. I deliver my documents as ISO-8859-1 (Latin-1), which contains
umlauts and other "special" chars. All browsers I have available on my
machines are able to handle that. And if you deliver your documents as
UTF-8 you don''t really have to care anymore.

I don''t think using entities is really necessary, except for <, >,
" and & sometimes. That''s why I''ve never used htmlentities(),
but htmlspecialchars().

Micha


这篇关于htmentities没有翻译德语“umlaute”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆