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. Centos6.7 安装ReviewBoard2.5.7 问题记录

    pip install ReviewBoard 1.修改pip源,默认源网络不畅 pip install -i http://pypi.douban.com/simple simplejson 2.p ...

  2. this的用法this.name=name 这个什么意思

    public Employee(string name, string alias){ // Use this to qualify the fields, name and alias: this. ...

  3. css区块定位之浮动与清除属性

    float属性将所属标记的显示空间指定为一个浮动元素,并使其周围对象按一定的方式环绕它排列. float属性的作用就象图像和表格的align属性一样,但可以用到任何元素上. clear属性的作用是禁止 ...

  4. Windows2008RT搭建VPN服务器

    总结一下2008系统搭建VPN的步骤和过程,自己有个人网站和服务要通过互联网发布出来.服务器放在自己家里,宽带是民用的.也就产生了服务发布的一些问题.用无法映射出真实的公网IP,或是一些其他内部的问题 ...

  5. GitHub 菜鸟使用

    之前有用过一次,但是一直弄不明白怎么用,今天我又试了一下,成功了,现在我就记录下来,为了以后的使用以及帮助那些跟我原先一样不会用的同学 进入正题: Step 1: 注册GitHub账号 https:/ ...

  6. The Best Coder and Why? (最牛气的程序员)——精彩!

    原文出处我已经找不到了,总之不是原创了,不过,重新看过,挺受震撼的.程序员出身的我们,或许记不住某些算法细节,但记住他们的名字,也许是应该的. MIT BBS上说微软电话面试的一道题就是“Who do ...

  7. Ubuntu下,在Eclipse中使用JNI调用ffmpeg

    Android的应用层开发大部分还是采用JAVA,如果想使用ffmpeg库,就必须利用JNI,使得Java可以调用C/C++的库. JNI其实就是定义的一个转接接口,可以让Java的代码调用C/C++ ...

  8. Robot Framework作者建议如何选择自动化测试框架

    本文摘自:InfoQ中文站http://www.infoq.com/cn/news/2012/06/robot-author-suggest-autotest Robot Framework作者建议如 ...

  9. poj2163

    #include <stdio.h> #include <stdlib.h> int main() { ; ]; scanf("%d %d %d",& ...

  10. http://docs.aliyun.com/#/rds/best-practices/collocation&security

    http://docs.aliyun.com/#/rds/best-practices/collocation&security