unicode转码
来源:互联网 发布:菲拉格慕蓝色经典 知乎 编辑:程序博客网 时间:2024/05/21 12:48
将unicode的字符串转程unicode
function unicode2utf16(codePoint) {
if (typeof codePoint === ‘string’) {
codePoint = parseInt(codePoint, 16);
}
if (codePoint < 0xdbff) {
return String.fromCharCode(codePoint);
} else {
var high = Math.floor((codePoint - 0x10000) / 0x400) + 0xd800;
var low = (codePoint - 0x10000) % 0x400 + 0xdc00;
return String.fromCharCode(high, low);
}
}
function delImageTail(str){
var reg = /.png$/;
return str.replace(reg,”);
}
0 0
- Unicode转码
- unicode转码
- unicode转码
- 转码utf8 - unicode 和 unicode - utf8
- java unicode 转码
- C# unicode utf8 转码
- C# unicode转码
- 转码ascii转unicode
- Java中Unicode转码
- Unicode
- Unicode
- unicode
- Unicode
- Unicode
- Unicode
- unicode
- UNICODE
- unicode
- HDOJ 5773 The All-purpose Zero
- java的初始化顺序
- 关于UPnP Device Architecture 2.0的阅读笔记(三)
- iOS动画大全
- linux下快速安装nginx
- unicode转码
- Bitmap—— BitmapFactory.decodeFile
- serialVersionUID的作用
- Ajax网页实现异步更新----理解
- mockito简单教程
- 经典问题总结
- HDU5823(2016多校第八场)——color II (状压dp,独立集)
- 线段树 扫描线
- HDU 5093 Battle ships [二分图匹配] [匈牙利算法]