mojo 关闭utf8
[root@wx03 ~]# cat test.pl
use Mojolicious::Lite;
use JSON qw/encode_json decode_json/;
use Encode;
no strict;
use JSON;
use Data::Dumper;
#no utf8;
# /foo?user=sriget '/admin/api/menu' => sub {my $c = shift;print "测试更健康\n";open (LOG1 ,"<",'/data01/applog_backup/zj-api01-catalina.out') or die $!;while (<LOG1>) {my $phone='18072722237';#2016-03-09 09:35:12,380 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为132435,本验证码5分钟内有效。 to phoneNo:18072722237 succeed!if ( ($phone) and ($_ =~/$phone/) and ($_ =~/SMSUtils/) ){$str=$_;# my $d=encode_utf8('验证');my $d='验证';print "1-------\$str is $str\n";next if ($str !~ /$d/);print "2--------\$str is $str\n";push (@arr1 ,$str);}};close LOG1;$c->render(text => "测试更健康" );
};app->start;此时接口返回;[root@wx03 ~]# morbo test.pl Server available at http://127.0.0.1:3000
[Thu Jun 30 19:50:58 2016] [debug] GET "/admin/api/menu"
[Thu Jun 30 19:50:58 2016] [debug] Routing to a callback
Wide character in print at /root/test.pl line 11.
测试更健康
1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed![Thu Jun 30 19:50:58 2016] [debug] 200 OK (0.00104s, 961.538/s)/******[root@wx03 ~]# cat test.pl
use Mojolicious::Lite;
use JSON qw/encode_json decode_json/;
use Encode;
no strict;
use JSON;
use Data::Dumper;
#no utf8;
# /foo?user=sriget '/admin/api/menu' => sub {my $c = shift;print "测试更健康\n";open (LOG1 ,"<",'/data01/applog_backup/zj-api01-catalina.out') or die $!;while (<LOG1>) {my $phone='18072722237';#2016-03-09 09:35:12,380 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为132435,本验证码5分钟内有效。 to phoneNo:18072722237 succeed!if ( ($phone) and ($_ =~/$phone/) and ($_ =~/SMSUtils/) ){$str=$_;my $d=encode_utf8('验证');# my $d='验证';print "1-------\$str is $str\n";next if ($str !~ /$d/);print "2--------\$str is $str\n";push (@arr1 ,$str);}};close LOG1;$c->render(text => "测试更健康" );
};app->start;[root@wx03 ~]# morbo test.pl
Server available at http://127.0.0.1:3000
[Thu Jun 30 19:52:38 2016] [debug] GET "/admin/api/menu"
[Thu Jun 30 19:52:38 2016] [debug] Routing to a callback
Wide character in print at /root/test.pl line 11.
测试更健康
1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!2--------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本30分钟内有效。 to phoneNo:18072722237 succeed![Thu Jun 30 19:52:38 2016] [debug] 200 OK (0.001048s, 954.198/s)/************ 关闭utf-8[root@wx03 ~]# cat test.pl
use Mojolicious::Lite;
use JSON qw/encode_json decode_json/;
use Encode;
no strict;
use JSON;
use Data::Dumper;
no utf8;
# /foo?user=sriget '/admin/api/menu' => sub {my $c = shift;print "测试更健康\n";open (LOG1 ,"<",'/data01/applog_backup/zj-api01-catalina.out') or die $!;while (<LOG1>) {my $phone='18072722237';#2016-03-09 09:35:12,380 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为132435,本验证码5分钟内有效。 to phoneNo:18072722237 succeed!if ( ($phone) and ($_ =~/$phone/) and ($_ =~/SMSUtils/) ){$str=$_;# my $d=encode_utf8('验证');my $d='验证';print "1-------\$str is $str\n";next if ($str !~ /$d/);print "2--------\$str is $str\n";push (@arr1 ,$str);}};close LOG1;$c->render(text => "测试更健康" );
};app->start;接口返回;[root@wx03 ~]# morbo test.pl
Server available at http://127.0.0.1:3000
[Thu Jun 30 19:55:09 2016] [debug] GET "/admin/api/menu"
[Thu Jun 30 19:55:09 2016] [debug] Routing to a callback
测试更健康
1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!2--------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本30分钟内有效。 to phoneNo:18072722237 succeed![Thu Jun 30 19:55:09 2016] [debug] 200 OK (0.001001s, 999.001/s)
转载于:https://www.cnblogs.com/zhaoyangjian724/p/6199751.html
mojo 关闭utf8相关推荐
- 关于JAVA字符编码:Unicode,ISO-8859-1,GBK,UTF-8编码及相互转换
出处: https://www.cnblogs.com/haimishasha/p/6117968.html 目录 1.1. ISO-8859-1 通常叫做Latin-1 1.2. GB2312/GB ...
- java linux urlencode_java字符编码转换研究(转)
1. 概述 本文主要包括以下几个方面:编码基本知识,java,系统软件,url,工具软件等. 在下面的描述中,将以"中文"两个字为例,经查表可以知道其GB2312编码是" ...
- 【JAVA编码专题】 JAVA字符编码系列三:Java应用中的编码问题
这两天抽时间又总结/整理了一下各种编码的实际编码方式,和在Java应用中的使用情况,在这里记录下来以便日后参考. 为了构成一个完整的对文字编码的认识和深入把握,以便处理在Java开发过程中遇到的各种问 ...
- java encode in ansi_Java应用中的编码问题
1. 概述 本文主要包括以下几个方面:编码基本知识,java,系统软件,url,工具软件等. 在下面的描述中,将以"中文"两个字为例,经查表可以知道其GB2312编码是" ...
- unix系统编码 java_JAVA字符编码系列三:Java应用中的编码问题
这两天抽时间又总结/整理了一下各种编码的实际编码方式,和在Java应用中的使用情况,在这里记录下来以便日后参考. 为了构成一个完整的对文字编码的认识和深入把握,以便处理在Java开发过程中遇到的各种问 ...
- 字符,字节和编码三者的关系
转载自http://www.blogjava.net/fundei/ 1. 编码问题的由来,相关概念的理解 1.1 字符与编码的发展 从计算机对多国语言的支持角度看,大致可以分为三个阶段: 系统内码 ...
- Perl Unicode全攻略
分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow 也欢迎大家转载本篇文章.分享知识,造福人民,实现我们中华民族伟大复兴! 转载:h ...
- perl unicode
[+] 目录(?)[-] 实例详细介绍各种字符集编码转换问题 转 Perl对中文的处理问题 perl对中文的处理encodedecode perl与中文信息处理 一文件分割 二字频统计 三回文 CMD ...
- jsp未正确拼写字 mysql_JAVA字符编码
UCS-2, 与unicode的2byte编码基本一样. UCS-4, 4byte编码, 目前是在UCS-2前加上2个全零的byte. UTF:Unicode/UCS Transformation F ...
最新文章
- python 连接db2_大迷糊的博客
- Vmware学习虚拟机操作时遇到的问题和解决
- php ajax实现的二级(多级)联动菜单(2008-10-21,11:36:08)
- 科大星云诗社动态20210511
- 网易云信即时通讯推送保障及网络优化详解(三):如何在弱网环境下优化大数据传输
- Windows Server 2008 R2安装Zune 4.0解决方法
- json对象数组按对象属性排序
- docker部署resin应用
- Linux设备驱动模型1——简介和底层架构
- 计算机系统的主要功能要求,计算机系统的主要功能是什么
- 【c++基础】菱形继承问题
- 宏转录组方法_中山大学医学院施莽教授学术讲座:宏转录组方法在病原生物学领域的应用...
- julia 调用python库_install julia with python
- 药店app的布局html,APP首页常用排版
- 【整理】基因编辑最新进展
- 交换机分布缓存_一种交换机的缓存管理方法
- Ansible9:变量之Fact
- java月亮代码_Java编程实现月食简单代码分享
- Vscode连接远程服务器出现‘Acquiring lock on/home/~’问题
- 多元线性回归案例(改)