thinkphp设置路由失效的问题
2012-07-19 23:53
417 查看
经常会用到正则,要验证中文,就找了点关于unicode的资料
字符串转 UCS2
UCS2 转字符串
另:CJK字符集从\u4e00-\u9fff,具体参见 http://unicode.org/charts/ http://www.unicode.org/charts/PDF/U4E00.pdf http://en.wikipedia.org/wiki/Han_unification
字符串转 UCS2
var unicode = '', str = '中文'; for (var i=0; i<str.length; i++) { unicode += '\\u'+str.charCodeAt(i).toString(16); } console.log(unicode); // => \u4e2d\u6587
UCS2 转字符串
var s = "\u4e2d\u6587"; s.toString(); // => 中文
另:CJK字符集从\u4e00-\u9fff,具体参见 http://unicode.org/charts/ http://www.unicode.org/charts/PDF/U4E00.pdf http://en.wikipedia.org/wiki/Han_unification
相关文章推荐
- 关于.NET MVC中带扩展名路由设置失效的问题的问题
- 开发日志:设置<DIV>内容不自动换行,及inline后width和height等失效的问题
- Ubuntu Apache2开启mod_rewrite解决laravel路由失效问题
- CentOS设置系统时间,重启后失效问题
- easyui中radio设置默认checked失效的问题解决方案
- 关于用js和attr("selected",true);给select设置选中的值失效问题
- Thinkphp检测登录或操作超时(针对设置session有效期失效)
- thinkPHP验证码失效的问题
- 解决:使用primefaces中datatable的scrollHeight时,列宽度设置失效问题
- [已解决] MediaPlayer.setVolume设置声音大小失效问题
- 解析thinkphp import 文件内容变量失效的问题
- 关于yii2路由优化失效问题(集成环境或者iis配置)
- Thinkphp M 中的 where 失效问题
- 解决Linux系统在设置alias命令重启后失效的问题
- THINKPHP nginx设置路由为PATHINFO模式
- 处理由于浏览器设置导致的autocomplete="off"失效的问题引起input 黄色背景问题
- 关于用js和attr("selected",true);给select设置选中的值失效问题
- 解决Redis设置密码重启后失效的问题
- THINKPHP短链接设置方法(路由设置)
- 带扩展名的路由失效问题