有关iPhone表情符号和网页的问题 [英] Questions about iPhone emoji and web pages

查看:88
本文介绍了有关iPhone表情符号和网页的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



好的,所以表情符号基本上可以在计算机上显示以上内容.那是另一种编程语言吗?那么,如何将那些小盒子放到php文件中呢?当我将其放入php文件时,它变成问号,而没有.另外,如何将它们存储在MySQL中而又不会变成问号和其他怪异的东西呢?

Okay, so emoji basically shows the above on a computer. Is that another programming language? So how do I put those little boxes into a php file? When I put it into a php file, it turns into question marks and what not. Also, how can I store these in a MySQL without it turning into question marks and other weird things?

推荐答案

如何将这些小盒子放入php文件?

how do I put those little boxes into a php file?

与任何其他Unicode字符相同.只需粘贴它们,并确保您要保存PHP文件并将PHP页面作为UTF-8提供.

Same way as any other Unicode character. Just paste them and make sure you're saving the PHP file and serving the PHP page as UTF-8.

当我将其放入php文件时,它变成问号,什么都没有

When I put it into a php file, it turns into question marks and what not

然后您遇到编码问题.使用Unicode字符进行处理,实际上您首先可以正确看到它们,例如ąαд™日本,然后再担心表情符号.

Then you have an encoding problem. Work it out with Unicode characters you can actually see properly first, for example ąαд™日本, before worrying about the emoji.

您的PHP文件应另存为UTF-8;它产生的页面应作为Content-Type: text/html;charset:UTF-8(或带有类似的meta标签)使用; MySQL数据库应使用UTF-8排序规则存储数据,PHP应使用UTF-8与MySQL通讯.

Your PHP file should be saved as UTF-8; the page it produces should be served as Content-Type: text/html;charset:UTF-8 (or with similar meta tag); the MySQL database should be using a UTF-8 collation to store data and PHP should be talking to MySQL using UTF-8.

但是.即使像这样正确处理所有内容,PC仍不会显示表情符号.那是因为:

However. Even handling everything correctly like this, PCs will still not show the emoji. That's because:

  1. 它们没有包含这些字符形状的字体,并且

  1. they don't have fonts that include shapes for those characters, and

表情符号仍未完全标准化.您发布的那些字符在Unicode专用区中,这意味着它们根本没有任何官方含义.

emoji are still completely unstandardised. Those characters you posted are in the Unicode Private Use Area, which means they don't have any official meaning at all.

日本的每个网络的表情符号使用不同的字符代码,并映射到PUA中的不同区域.因此,即使在另一部手机上,它也可能不会显示正确的字符,除非您花了很长时间手动为不同的网络转换表情符号代码.我猜你上面发布的是来自SoftBank(iPhone?).

Each network in Japan uses different character codes for their emoji, mapped to different areas in the PUA. So even on another mobile phone, it probably won't display the correct character, unless you spend ages manually converting emoji codes for different networks. I'm guessing the ones you posted above are from SoftBank (iPhone?).

Google和Apple提出了一项正在进行的提案,以整理不同网络的表情符号,并为它们提供适当的Unicode标准化位置.在此之前,让表情符号在整个网络中始终显示始终是一种不快乐的练习.请参阅标准化工作中的字符概述,以了解您将获得多少转换要做.

There is an ongoing proposal led by Google and Apple to collate the different networks' emoji and give them a proper standardised place in Unicode. Until then, getting emoji to display consistently across networks is an exercise in unhappiness. See the character overview from the standardisation work to see how much converting you would have to do.

上帝,我讨厌表情符号.这么多无用的三通垃圾带来的所有痛苦.

God, I hate emoji. All that pain for such a load of useless twee rubbish.

这篇关于有关iPhone表情符号和网页的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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