jpgraph字符集问题

发布于 2024-09-10 18:51:26 字数 706 浏览 2 评论 0原文

我使用 php jpgraph 库,但字符集存在小问题。 假设 graph.php 生成图像,我从 some.php

some.php

     ...
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
     ...
    <img src="graph.php" />
     ...

调用它,如您所见,我在<中设置字符集code>some.php,但它不显示图形的文本,这是外语的。(也许我必须在 graph.php 中设置它?但如何?)

问题是什么?

谢谢 更新

即使我尝试输入数字 HTML 编码也会 这里,它不适用于亚美尼亚语言:/

I use php jpgraph library, but there i a small problem with charsets.
lets assume graph.php generates the image, and i call it from some.php

some.php

     ...
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
     ...
    <img src="graph.php" />
     ...

as you see, i set charsets in some.php, but it doesn't show the text of the graph, which is in foreign language.(maybe i must set it in graph.php? but how?)

What is the problem?

Thanks
UPDATE

even when i try to enter numerical HTML encoding
of the Unicode character from here, it doesn't work for Armenia language:/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少女的英雄梦 2024-09-17 18:51:26

元标记仅适用于页面的内容,不适用于页面内显示的图像(甚至是由 graph.php 脚本动态生成的图像)

​​引用自 jpgraph 常见问题解答

16 如何打印 unicode 字符?

使用&#XXXX;格式化你的字符串
其中 XXXX 是十进制值
unicode 字符。您可能会找到一个
Unicode 字符列表
请访问 www.unicode.org 进行编码
观察列表中的编码
以十六进制给出,这些
值必须转换为十进制。

注意:如果您使用的是 UTF-8
那么人物的环境可能是
直接输入。

The meta tag only applies to the content of the page, not to images displayed within the page (even images generated dynamically by your graph.php script)

Quoting from the jpgraph faq

16 How can I print unicode characters?

Use &#XXXX; format in your strings
where XXXX is the decimal value for
the unicode character. You may find a
list of Unicode characters and there
encodings at www.unicode.org Please
observe that the encoding in the lists
are given in hexadecimal and these
values must be converted to decimal.

Note: If You are working in an UTF-8
environment then the characters may be
input directly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文