苹果相关

浏览模式: 标准 | 列表 | 图文
How to Mounting FTP/SFTP volumes with the Finder

How to Mounting FTP/SFTP volumes with the Finder

mac的finder不支持sftp连接服务器的.ftp是支持的.所以....问题一堆啊.

这不,网上有很多教程,有基于GUI的,有基于命令行的.

基于GUI的有两个教程,一个纯文字,一个有图版

我贴个纯文字的,然后有图版的请自己看,因为...转载图片很累啊

文字版来自 http://www.thxbye.de/mac/mac-mounting-ftpsftp-volumes-with-the-finder.html

have a server that only has FTP/SFTP/TLS support for accessing the files on it, which, in general, should be mostly sufficient. Now I’m using Mac OS X and Transmit/Yummy FTP for most of my tasks.

Since I’m a person who loves to have everything integrated into the standard GUI as good as possible I’ve been trying to find a solution for mounting directories/shares of that server straight into the finder, like you do with the iDisk or any other NFS/SMB/AFP share.

Unfortunately, the Finder itself only has read only FTP support (now I also know that FTP wasn’t made as a protocol for doing these kinds of things in the first place), which doesn’t get me too far actually, since every time I would want to upload/change a file I would need to start Transmit (or any other FTP client) and use the clunky non-embedded interface to manage the files, which is, for me at least, nowhere near satisfactory.

Sadly, after endless amounts of investigation and searching on google, I didn’t find a solution that works apart from “Use Transmit, it’s as close as you will get!”. I have tried everything that came onto my mind so far, even some very weird, exotic and just plain scary SSH tunnel workarounds, luck seems to avoid me though.

I found Google’s MacFUSE do to the job prettily, using a SSH filesystem (almost) works like a charm.

Download it and install, preferably compile it from the source, which is described in the Google Code HOWTO: code.google.com/p/macfuse/wiki/HOWTO

With the help of this you can basically mount SSH accounts as virtual volumes - and with the right parameters it even works in the Finder:

sshfs USERNAME@HOST:/DIR /MOUNTPOINT -oping_diskarb,volname=NAMEOFMOUNT ;

“USERNAME” being your SSH username;
“HOST” the SSH host;
“DIR” being the directory you want to mount;
“MOUNTPOINT” - you will need a mountpoint on your local filesystem, this should preferably be an empty directory. I just created empty directories in my home folder for that purpose (e.g. ~/mounts/orange);
“NAMEOFMOUNT” is the name of the volume as it will appear in the finger.

After entering this you should be prompted for the password of the SSH account, now, magically, you should have the volume appear in the Finder. Wee!

Now, the one and only real thing to make sure however is: Be aware that the Finder doesn’t like unstable connections - it will hopelessly beachball once the connection is interrupted unexpectedly for whatever reason.

有图版的来自 http://docs.ocf.berkeley.edu/wiki/SFTP_mount_in_Mac_OS_X

当然,这里还有一篇是命令行下怎么处理的,不过还得下载一个软件....

请看:http://www.danbishop.org/2011/09/10/how-to-mount-sftp-ssh-shares-in-os-x-lion/

他也介绍了macfusion,所以我贴了那段用命令行的:

If you’d like to use an sftp share directly though finder then this guide is for you.

First, you need to install OSXFuse from https://github.com/osxfuse/osxfuse/downloads

If you’re using OS X 10.8 (or above…) use the default install options and skip down to the Mountain Lion section now.

At the “Installation Type” stage, be sure to select MacFUSE Compatibility Layer. It’s unticked by default.

Once installed, you need to get Macfusion from http://macfusionapp.org/

Perform the usual drag and drop into your Applications folder then run Macfusion.

Add a new Macfusion share by clicking on the plus icon and selecting SSHFS, enter your details, click ok, then mount. After a few moments your share will be available. You can press cmd+r to show your share in the Finder.

You can now directly edit files on the sftp share using any app on your mac without the need to manually download and re-upload them.

If this process does not work for you, try restarting your mac, then re-adding the Macfusion share.

OS X Mountain Lion

Unfortunately Macfusion doesn’t work well with Mountain Lion (OS X 10.8). You can, however, still mount directories using the command line (Terminal).

First we need to download, then install sshfs: https://github.com/downloads/osxfuse/sshfs/SSHFS-2.4.1.pkg

Run through the installer with the default options.

Now create an empty directory to mount your sftp share in, for example:

dan@dans-imac:$ mkdir /Users/dan/sshfs

Then run the following:

dan@dans-imac:$ sshfs username@serveraddress:/path/to/remote/folder /Users/dan/sshfs

Navigate to /users/dan/sshfs in Finder and you’ll have access to your sftp share.

----EOF---

自此,方便了很多..smb有时候不太稳定,我感觉...好纠结

关于APNS的一些小问题

关于APNS的一些小问题

此段内容其实有很多都知道,只是这里把问题相对集中的显示出来,也容易找到问题.所以我就转载了一下...

内容来自

以下是大杂烩:

1.不要用一个开源的叫javapns的lib来推送,这个项目代码臃肿混乱,过度设计,还内存溢出;可以使用notnoop.apns
2.Push会延时,也会被丢弃,似乎网络情况,Push本身带有Expiry,超过该值APNS会丢掉Push
3.Push有三个基本属性,alert、badge、sound,通过将一些置空,可以实现只修改App上的气泡不出现文本、出现文本但不提示声音,发出声音而不出现任何提示等等效果
4.Push除了三个基本属性,还可以附带任意json数据,但总大小不能超过256字节
5.要异步发送Push,可以将应用内的Push序列化到Redis队列再消费,并且增加队列监控
6.和国外服务的连接速度比较慢,要建立多个连接,使用多线程发送
7.APNS有提供feedback服务,用于查询一个Token是否有效
8.一台iPhone上的一个App会有两种Token,一种是Developer的,一种是正式Product的,不能混用,在一个与APNS的SSL连接里,使用Developer Token向Product发送Push是无法送达的,同时在十几秒内即使用正确的Product Token发送也无法送达,效果就像直接丢弃
9.iPhone上的App处于前台运行时,即使受到Push也不会在界面出现提示,此时App内的回调函数会收到
10.高速地向一台设备发送大量Push,Apple会自动丢掉部分Push
APNS 推送

APNS 推送

关于apns这玩意,以前也写过不少的博客来介绍它了,国内的文章都是基于同一套代码的.
而正因为对apns了解的少,所以写的代码,以及对它的扩展都是不够完善的.

不过google code上终于有一套相对比较完善的代码了.https://code.google.com/p/apns-php/,其实在最近他已经迁移到了github了(October 26, 2012, Project source code has moved to github. )
看了一下代码,确实不错.
如果是原先的代码,其实一直有一个问题:如果某个token失效了,那么在接下来的10s左右,fwrite的推送都会失败.
虽然苹果提供了feedback的返回,但其实你翻看国内的文章,介绍,都没有告诉你怎么查询feedback,所以我到现在也没有好好的对Feedback处理过那些无效的信息.

上面介绍的这套代码就好很多了.可以进行推送,在失败的话,还能够继续推,如果成功的推送是直接可以进入下一条,不会胡乱浪费资源,真心不错...
代码也很简单:

$push = new ApnsPush(ApnsAbstract::ENVIRONMENT_SANDBOX, '/dev.pem');
// Set the Root Certificate Autority to verify the Apple remote peer

//$push->setRootCertificationAuthority('entrust_root_certification_authority.pem');
// Increase write interval to 100ms (default value is 10ms).
// This is an example value, the 10ms default value is OK in most cases.
// To speed up the sending operations, use Zero as parameter but
// some messages may be lost.
// $push->setWriteInterval(100 * 1000);
// Connect to the Apple Push Notification Service
$push->connect();
foreach ($result as $data) {
$token = $appCache->getAppTokenByUserId($data['receive_userid']);
if(!$token){
continue ;
}
$token = str_replace(" ","",$token);
// Instantiate a new Message with a single recipient
$message = new ApnsMessage($token);
// Set a custom identifier. To get back this identifier use the getCustomIdentifier() method
// over a ApnsMessage object retrieved with the getErrors() message.
//$message->setCustomIdentifier(sprintf("Message-Badge-%03d", $i));
// Set badge icon to "3"
$message->setBadge( intval($data['cnt']));
// Add the message to the message queue
$push->add($message);
}
// Send all messages in the message queue
$push->send();
// Disconnect from the Apple Push Notification Service
$push->disconnect();
// Examine the error message container
$aErrorQueue = $push->getErrors();
if (!empty($aErrorQueue)) {
var_dump($aErrorQueue);
}

这段代码不要纠结,为什么与官方不一样,因为我在用yii框架的时候没有autoload成功它的 代码,花了5分钟将它全部改成基于namespace的了.

Parallels Desktop 8 pd8 破解 无限试用

Parallels Desktop 8 pd8 破解 无限试用

说实话,在MAC上面最好的虚拟机,绝对是parallels desktop,没有之一。
试用过几款虚拟机,但效果真的不能让人满意,vmware/vbox都响应没有pd快。而且更重要的是vmware的无缝集成的性能远远不如PD。。。

PD6,我买了,升到了PD7,但在PD7下面retina的分辨率无法调整。
所以想升级到PD8,但因为win用的少,所以现在还在忍着。如果你不想忍,这里有个办法:

说实话,macx.cn上代理的PD只有180左右,如果你真的需要,买一个吧。。。当然,如果你觉得你的时间很多,无所谓每个月折腾这么一次,也完全可以象上面那样一次次的折腾的。

pinyinconvert.zip

Mou生成PDF时颜色偏淡的解决方法

Mou生成PDF时颜色偏淡的解决方法

Mou是一款很优秀的Markdown编辑软件,在MAC下面的展现比较趋向于完美,但一直以来生成PDF时,颜色都非常淡:
f76ed4db10681f784a7a288456cf198a
眼睛都快看花了,而LiteIDE里,作者说他是用的Mou授权的CSS文件,却生成出来是这样的效果:
8b5e903f2d038c7f402be925c3a16067
这相差也太大了。所以就发了封邮件给作者,作者回复的很快,然后发现我也被鄙视了。。。

你好!我猜你一定是 Mou 的老用户了(从 0.7.2 之前就开始用了),因为这个 CSS 早在 Mou 0.7.3(去年8月19号) 就已经更新过了(PDF颜色加深)。

但是为了保证用户之前自定义 CSS 的安全,Mou 不会主动覆盖旧的 CSS,如果想使用新的 CSS,需手动删除
~/Library/Application Support/Mou/CSS/
目录下旧的 CSS,重启 Mou,Mou 会创建新的 CSS。

这点已在 Release Notes 中多次提及:
http://mouapp.com/releasenotes/

看了一下mouapp的releasenotes,那一行果然是其他颜色的。。。天啊。更新这么多次了,都没有看过别人的releasenotes。。。郁闷
ee0e66909ea7c8344580a63185f195b8
于是进入目录,删除了CSS,重打开Mou,Export 一份PDF,果然正常了。Oh Yeah。。

作者还提供了修改CSS的方法:

另外如果需要自定义 CSS,不能直接修改 .app 包里的,如果真的那样设定,岂不是每一次更新,用户的自定义 CSS 都会丢掉?

正确的目录是
~/Library/Application Support/Mou/CSS/
如果你在 Preferences>CSS 里点击 Edit… 按钮,引导过去的也是这个目录而不是 .app 包里的。

关于自定义 CSS,可以直接修改现有的,也可以把新的 CSS 文件(文件名随意)拖到这个目录下,重启 Mou 后它会自动刷新 CSS 列表,当再次进入 Preferences>CSS 里时,就可以在列表中选用你新加入的这个 CSS 了。

还有一篇关于只应用于 PDF 的自定义 CSS 技巧的 Blog:
http://chenluois.com/blog/mou-pdf-export-page-break/

享受Mou吧

用TimeMachine恢复数据

用TimeMachine恢复数据

系统刚刚到手的时候,什么 都没有,怎么办?第二天就要准备开发了。然后要下载一大堆软件?

于是拿原来的机器做了一下备份,很简单:
1、插上USB,打开timemachine,开始备份
2、新机器插上刚刚timemachine的USB移动硬盘,启动的时候按OPTION,选择恢复
3、选择用timemachine恢复旧系统,这时候会搜索移动硬盘。会找到timemachine的内容。如果你有多次备份,请记得选对

重启,一切Over

不过有几件事要记住
1、如果你有分区,那只能恢复主分区。所以我有时候就觉得那第二个分区timemachine还有啥用????
2、在系统正在运行的时候,你的timemachine无法找到另一台机器的备份数据,只有刚刚新机器的备份数据。
3、另外的分区,也很方便,但为了拷贝数据完整,建议cp -R,这样会好一点
4、有些设置无法导过来,忍忍吧。。。

最起码我100多G半个多小时就过来了。。(3.0USB的速度还是不错的。可惜启动的时候用不到3.0)

Things的同步无效了

Things的同步无效了

在电脑中辛苦的加了一些计划,发现手机上没有同步回来。再看了一下,上次同步时间已经是很久前了。
于是检查再检查,同时google了一下。终于发现一个小问题

1、things 的同步服务器是用GAE的。于是:http://code.google.com/status/appengine,这里面不正常的时候,你肯定会不正常

2、GAE经常被墙,最近斯巴达 勇士们在战斗了。所以GAE又抽风了。所以,你懂的。

3、肿么办?还 好我自备铝合金梯子,翻过了小墙。嗯,我会小心的,不会象某大学同学那样,在翻墙的时候摔倒,被刺破了XX。当初看到那张图时,我就不禁蛋疼了一下。

还是APNS的一些问题

还是APNS的一些问题

其实在做APNS发送信息的时候,总会有一些信息好象没有收到。所以我就在想是什么问题。

看到这一篇的时候,才感觉可能会是这种原因:

问题四:Push消息丢失

如果客户端偶尔能收到消息,但有丢失,那很有可能是服务器往苹果APNs服务器写入失败、或者写成功后苹果服务器未发送(批量往一堆token发送消息,如果第一个token发送失败,那么苹果不会再给后面同一批的token推送消息)。失败原因可通过向苹果做Feekback查询。

---

这段文字来自:http://yangzl.net/tag/ios%E5%BC%80%E5%8F%91%EF%BC%8C%E6%B6%88%E6%81%AF%E6%8E%A8%E9%80%81/

同时觉醒和我说,feekback在这里可以查询一下:http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html

里面是这么一句:Feedback Service

Sometimes APNs might attempt to deliver notifications for an application on a device, but the device may repeatedly refuse delivery because there is no target application. This often happens when the user has uninstalled the application. In these cases, APNs informs the provider through a feedback service that the provider connects with. The feedback service maintains a list of devices per application for which there were recent, repeated failed attempts to deliver notifications. The provider should obtain this list of devices and stop sending notifications to them. For more on this service, see “The Feedback Service.”

证明还是可以查的嘛 .准备下次慢慢查一下

转:Emoji表情符号兼容方案

Emoji,原来的项目中没有遇到,因为从未想过别人会从网页里发送表情(表情 信息是从iphone手机上发出来的),查了一下资料,果然很多人遇到了这个问题。不过也幸好有了解决方案了。。。

Emoji表情符号兼容方案

一 什么是Emoji

emoji就是表情符号;词义来自日语(えもじ,e-moji,moji在日语中的含义是字符)
表情符号现已普遍应用于手机短信和网络聊天软件。
emoji表情符号,在外国的手机短信里面已经是很流行使用的一种表情。
手机上如何使用emoji:
1.iphone、ipad系统:安装emoji free,再设置-通用-键盘-国际键盘-添加新的键盘,然后把emoji添加在里面即可在发短信和一些输入文本的文本框中输入表情。
IOS 5用户可直接从通用中添加emoji 键盘,无需再安装emoji free
2.android系统:安装“GO输入法国际版”后,在输入法里面点选安装emoji插件可以使用。另外“百度输入法”也自带emoji表情
3.Windows Phone : 安装此 Emoji Keys,在其中输入之后复制粘贴到需要输入表情的地方即可

<此段摘自百度百科 http://baike.baidu.com/view/2631589.htm>

cfd13545d05b4a8b360ad8081f43e094

二 Emoji表情符号问题
1 问题:
IOS版本之间发送的Emoji表情符号不兼容,只看到方块
不同IOS版本在数据库存数据时,有时会发生系统错误
2 现象:
IOS 4 输入Emoji表情符,在IOS5.01 显示正常,在IOS5.1中(大陆版)显现为方块, 但IOS5.01/5.1输入的表情符号,显示正 常
IOS5.01/5.1 输入表情符,在IOS5.01/5.1中显示正常,但在IOS4.X显示为方块
输入Emoji入帖子正文, 可正常存储。 但用户昵称在IOS4.X 输入Emoji,系统正常, 而IOS5.01/5.1则提示系统错误。
3 本质:
iOS 5 and OS X 10.7 (Lion) use the Unicode 6.0 standard ‘unified’ code points for emoji.
iOS 5 Emoji 采用Unicode 6 标准来统一code points

iOS 4 on SoftBank iPhones used a set of unofficial code points in the Unicode Private Use Area, and so aren't compatible with any other systems
iOS 4 采用SoftBank Unicode, 一种非官方的, 采用私有Unicode 区域。
4 举例:
one emoji symbol "tiger", it is "\U0001f42f" in iOS5, but "\ue050" in earlier iOS version
虎脸Emoji符号在iOS5 为Unicode:\U0001f42f;而在IOS4.x 为:\ue050 (SoftBank 编码)
另外: 按理讲, 从iOS5 应该兼容以前版本的emoji, 但现在出现5.01版本完美兼容(无论大陆版,美版,还是港版), 而5.1 大陆版出现了不兼容现象(腾讯微信也出现了同样的问题)。
三 问题分析
1 系统存储错误问题(如昵称,帖子内容)
原因:
由于IOS5.X 采用新的Unicode, 其UTF8 编码大多为4个字节, 而由于昵称/帖子内容column并没设成utf8mb4,因此存储会 发生错误。
解决方法:
将昵称/帖子内容设成utf8mb4
2 不同iOS 之间Emoji 不兼容的问题。
原因:
iOS 5 到4 不兼容的问题,很简单,unicode6 和softbank编码的不同
iOS 4 到 5,按理说应该兼容,也就是说,iOS应该自动判断如果是softbank编码,自动转成unicode6。但现在看来, iOS5.1(大陆版)好像只支持unicode6, 而不支持softbank.
解决方法:
客户端发送emoji-encoding: Softbank或unicode6, 由服务端分别给出相应的编码表。
四 解决方案
1 数据存储(MySQL varchar 数据类型对UTF8 支持问题)
MYSQL 5.5 之前, UTF8 编码只支持1-3个字节, 从MYSQL5.5开始,可支持4个字节UTF编码,但要特殊标记。例如我们的帖子内容项,我们加上了这个支持。服务端mysql统一存储为ios5.x也就是Unicode编码。
对应alter语句:

ALTER TABLE topic MODIFY COLUMN content varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '内容';

2 编码转换:
iphone手机方案
客户端输入内容时候,统一存储为unicode编码(这里需要从softbank编码转换为unicode编码)。客户端请求内容的时候,需要根据不同的客户端给出不同的编码,ios4采用softbank编码做替换,ios5采用unicode编码直接支持。
android或wp其他手机方案:
如果没有emoji表情库,将无法输入。针对输入问题,将统一采用unicode编码存储。客户端请求内容的时候,将统一用softbank编码,客户端需要把emoji表情符号内置到客户端,做对应的编码和img替换。
web解决方案:
参考android或wp其他手机方案
五 部分代码
1 sql代码

CREATE TABLE `ios_emoji` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`unicode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Unicode编码',
`utf8` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'UTF8编码',
`utf16` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'UTF16编码',
`sbunicode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SBUnicode编码',
`filename` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文件名',
`filebyte` longblob COMMENT '文件内容字节',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='ios表情编码表';

2 java代码

import java.io.UnsupportedEncodingException;
import org.apache.commons.lang.StringUtils;


public class IOSEmojiUtil {

public static String[] ios5emoji ;
public static String[] ios4emoji ;
public static String[] androidnullemoji ;
public static String[] adsbuniemoji;

public static void initios5emoji(String[] i5emj,String[] i4emj,String[] adnullemoji,String[] adsbemoji){
ios5emoji = i5emj;
ios4emoji = i4emj;
androidnullemoji = adnullemoji;
adsbuniemoji = adsbemoji;
}

//在ios上将ios5转换为ios4编码
public static String transToIOS4emoji(String src) {
return StringUtils.replaceEach(src, ios5emoji, ios4emoji);
}
//在ios上将ios4转换为ios5编码
public static String transToIOS5emoji(String src) {
return StringUtils.replaceEach(src, ios4emoji, ios5emoji);
}
//在android上将ios5的表情符替换为空
public static String transToAndroidemojiNull(String src) {
return StringUtils.replaceEach(src, ios5emoji, androidnullemoji);
}

//在android上将ios5的表情符替换为SBUNICODE
public static String transToAndroidemojiSB(String src) {
return StringUtils.replaceEach(src, ios5emoji, adsbuniemoji);
}

//在android上将SBUNICODE的表情符替换为ios5
public static String transSBToIOS5emoji(String src) {
return StringUtils.replaceEach(src, adsbuniemoji, ios5emoji);
}

//eg. param: 0xF0 0x9F 0x8F 0x80
public static String hexstr2String(String hexstr) throws UnsupportedEncodingException{
byte[] b = hexstr2bytes(hexstr);
return new String(b, "UTF-8");
}

//eg. param: E018
public static String sbunicode2utfString(String sbhexstr) throws UnsupportedEncodingException{
byte[] b = sbunicode2utfbytes(sbhexstr);
return new String(b, "UTF-8");
}

//eg. param: 0xF0 0x9F 0x8F 0x80
public static byte[] hexstr2bytes(String hexstr){
String[] hexstrs = hexstr.split(" ");
byte[] b = new byte[hexstrs.length];

for(int i=0;i<hexstrs.length;i++){
b[i] = hexStringToByte(hexstrs[i].substring(2))[0];
}
return b;
}

//eg. param: E018
public static byte[] sbunicode2utfbytes(String sbhexstr) throws UnsupportedEncodingException{
int inthex = Integer.parseInt(sbhexstr, 16);
char[] schar = {(char)inthex};
byte[] b = (new String(schar)).getBytes("UTF-8");
return b;
}

public static byte[] hexStringToByte(String hex) {
int len = (hex.length() / 2);
byte[] result = new byte[len];
char[] achar = hex.toCharArray();
for (int i = 0; i < len; i++) {
int pos = i * 2;
result[i] = (byte) (toByte(achar[pos]) << 4 | toByte(achar[pos + 1]));
}
return result;
}


private static byte toByte(char c) {
byte b = (byte) "0123456789ABCDEF".indexOf(c);
return b;
}

public static void main(String[] args) throws UnsupportedEncodingException {
// TODO Auto-generated method stub
byte[] b1 = {-30,-102,-67}; //ios5 //0xE2 0x9A 0xBD
byte[] b2 = {-18,-128,-104}; //ios4 //"E018"

//-------------------------------------

byte[] b3 = {-16,-97,-113,-128}; //0xF0 0x9F 0x8F 0x80
byte[] b4 = {-18,-112,-86}; //E42A


ios5emoji = new String[]{new String(b1,"utf-8"),new String(b3,"utf-8")};
ios4emoji = new String[]{new String(b2,"utf-8"),new String(b4,"utf-8")};


//测试字符串
byte[] testbytes = {105,111,115,-30,-102,-67,32,36,-18,-128,-104,32,36,-16,-97,-113,-128,32,36,-18,-112,-86};
String tmpstr = new String(testbytes,"utf-8");
System.out.println(tmpstr);


//转成ios4的表情
String ios4str = transToIOS5emoji(tmpstr);
byte[] tmp = ios4str.getBytes();
//System.out.print(new String(tmp,"utf-8"));
for(byte b:tmp){
System.out.print(b);
System.out.print(" ");
}
}

}

六 参考资料
1 Emoji 全编码表:(我参考的这个)
http://punchdrunker.github.com/iOSEmoji/table_html/flower.html
2 Emoji全编码表
http://code.iamcal.com/php/emoji/

3 iOS5/4 Emoji 兼容性:
http://stackoverflow.com/questions/7856775/how-to-convert-the-old-emoji-encoding-to-the-latest-encoding-in-ios5
4 MySQL emoji问题
http://dropblood.com/archives/ios-mysql-emoji
5 Emoji 中文对应表
http://www.iapps.im/wp-content/uploads/2012/02/emoji-pinyin.png?r=010

七 下载资源

emoji图片和编码表 http://download.csdn.net/detail/qdkfriend/4309051

包括emoji文件表,emoji数据编码表(Unicode编码,UTF8编码,UTF16编码,SBUnicode编码)