jrhmpt01:/root# cat -n hcp.pl
1 use LWP::UserAgent;
2 use Encode;
3 $ua = LWP::UserAgent->new;
4 @header = (
5 'accept'=> "application/json",
6 'content-type'=> "application/json",
7 'apix-key'=> "e7b00871640c49567a37566ccd5c27e9",
8 'User-Agent' => "Mozilla/8.0"
9 );
10
11 $start = $ARGV[0];
12 $end = $ARGV[1];
13 $date = $ARGV[2];
14 $host="http://a.apix.cn/apixlife/ticket/rest?from=$start&to=$end&date=$date";
15 $request = HTTP::Request->new(GET=>"$host");
16 $request->header(@header);
17
18 $response = $ua->request($request);
19 $content= $response->decoded_content;
20 $content =~ s/\\u([0-9a-fA-F]{4})/pack("U",,hex($1))/eg;
21 print $content."\n";;
22 print "-----------------------\n";
23 print encode_utf8($content);
24 print "\n";
jrhmpt01:/root# perl hcp.pl BJP TJP 2015-12-11
Wide character in print at hcp.pl line 21.
{"status": true, "validateMessagesShowId": "_validatorMessage", "messages": [], "httpstatus": 200, "validateMessages": {}, "data": {"message": "没有符合条件的数据!", "flag": false}}
-----------------------
{"status": true, "validateMessagesShowId": "_validatorMessage", "messages": [], "httpstatus": 200, "validateMessages": {}, "data": {"message": "没有符合条件的数据!", "flag": false}}

Wide character in print at hcp.pl line 21.的更多相关文章

  1. perl unload utf-8 oracle Wide character in print at unload_oracle.pl line 105.

    #!/usr/bin/perl use DBI; use Encode; my $dbName = 'oadb'; my $dbUser = 'vxspace'; my $dbUserPass = ' ...

  2. Wide character in print at a2.pl line 返回json 需要encode_utf8

    centos6.5:/root/test#cat a2.pl use Net::SMTP; use LWP::UserAgent; use HTTP::Cookies; use HTTP::Heade ...

  3. Wide character in print at a2.pl line 6.

    jrhapt01:/home/tomcat/test> cat a2.pl my $str="$ARGV[0]"; use Encode; use URI::Escape; ...

  4. 为什么出现Wide character in print at a14.pl line 41

    [root@wx03 ~]# cat a14.pl use Net::SMTP; use LWP::UserAgent; use HTTP::Cookies; use HTTP::Headers; u ...

  5. php 返回json 解析 报Wide character in print

    php 返回json: zabbix:/var/www/html/DEVOPS/Home/Lib/Action# vim EquipmentAction.class.php <?php head ...

  6. SyntaxError: Non-ASCII character '\xe5' in file D:/pcode/xx.py on line 21, but no encoding declared

    from selenium import webdriver from datetime import * import time starttime = datetime.now() print ( ...

  7. Can't locate find.pl in @INC (@INC contains: /etc/perl xxxx) at perlpath.pl line 7.

    /********************************************************************** * Can't locate find.pl in @I ...

  8. error: converting to execution character set: Invalid or incomplete multibyte or wide character

    交叉编译.c文件,遇到如下问题 arm-linux-gcc -o show_lines show_lines.c -lfreetype -lm show_lines.c:199:19: error: ...

  9. SyntaxError: Non-ASCII character 'æ' in file csdn.py on line 7, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

    错误信息: SyntaxError: Non-ASCII character , but no encoding declared; see http://python.org/dev/peps/pe ...

随机推荐

  1. 分析JavaScript代码应该放在HTML代码哪个位置比较好

    本文总结了多种放置JS代码的方法,需要的朋友可以参考下 在哪里放置 JavaScript 代码? 通常情况下,JavaScript 代码是和 HTML 代码一起使用的,可以将 JavaScript 代 ...

  2. 12.java.lang.NoSuchMethodException

    java.lang.NoSuchMethodException 方法不存在异常 当程序试图通过反射来创建对象,访问(修改或读取)某个方法,但是该方法不存在就会引发异常

  3. Linux下面如何运行.sh文件

    Linux下面如何运行.sh文件   本文介绍Linux下面用命令如何运行.sh文件的方法,有两种方法: 一.直接./加上文件名.sh,如运行hello.sh为./hello.sh[hello.sh必 ...

  4. 一款C++静态分析工具 —— CppDepend

    Wrote by mutouyun. (http://darkc.at/cppdepend/) 去年6月份的时候,CppDepend的一位技术社区经理(technical community mana ...

  5. uvalive5810 uva12368 Candles

    题意:每组数据给出n个数,每个数在1-100,问组成这些数的蜡烛的权值的最小值.权值=把选的蜡烛从大到小排列组成的数 组成方式:比如有1 3两个蜡烛 可以组成13(1和3)或4(1+3) 只有一个加号 ...

  6. Rikka with Chess(规律)

    Rikka with Chess Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) ...

  7. CodeForces - 61E Enemy is weak

    Description The Romans have attacked again. This time they are much more than the Persians but Shapu ...

  8. delphi “Invalid floating point operation.”错误的解决方法

    这两天用webbrower写东西,有时候打开SSL加密站点时会出现”Invalid floating point operation.”的错误,上网搜了下,把解决方法贴上. 导致原因 在Delphi2 ...

  9. 从零开始学习UNITY3D(GUI篇 群组视图控件)

    控件组可以看成一个大的容器,控件组里面的控件,相对位置已该控件组为基准,而不再已屏幕左上角为基准. 下面来看一下代码实例及其效果截图: public class GUI2 : MonoBehaviou ...

  10. javascript 获取调用属性的对象

    最近碰到一个javascript 的小问题,是和闭包有关的,来自cnode 论坛,很有意思. var o = (function() { var person = { name: 'Vincent', ...