免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3634 | 回复: 2
打印 上一主题 下一主题

有人见过: >export PERL5OPT=-CA 这句怎么用吗? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-03-01 18:32 |只看该作者 |倒序浏览
如题:
有人见过: >export PERL5OPT=-CA  这句怎么用吗?

我正在找perl cgi程序 执行 shell 相关命令时,使用utf-8 编码,
这样或许能解决我的手动操作、单cgi脚本操作该命令,输出中文内容正常;html调用cgi脚本后,输出中文内容异常的现象。

论坛徽章:
7
戌狗
日期:2013-12-15 20:43:38技术图书徽章
日期:2014-03-05 01:33:12技术图书徽章
日期:2014-03-15 20:31:17未羊
日期:2014-03-25 23:48:20丑牛
日期:2014-04-07 22:37:44巳蛇
日期:2014-04-11 21:58:0915-16赛季CBA联赛之青岛
日期:2016-03-17 20:36:13
2 [报告]
发表于 2014-03-03 02:33 |只看该作者
本帖最后由 rubyish 于 2014-03-02 23:05 编辑

meiyou 用过~ {:3_188:}
http://perldoc.perl.org/perlrun.html
PERL5OPT
  1. Command-line options (switches). Switches in this variable are treated as if they were on every Perl command line.

  2. Only the -[CDIMUdmtwW] switches are allowed.

  3. When running taint checks (either because the program was running setuid or setgid, or because the -T or -t switch was used), this variable is ignored. If PERL5OPT begins with -T, tainting will be enabled and subsequent options ignored. If PERL5OPT begins with -t, tainting will be enabled, a writable dot removed from @INC, and subsequent options honored.
复制代码
  1. -C [number/list]

  2. The -C flag controls some of the Perl Unicode features.

  3. As of 5.8.1, the -C can be followed either by a number or a list of option letters. The letters, their numeric values, and effects are as follows; listing the letters is equal to summing the numbers.

  4.     I 1 STDIN is assumed to be in UTF-8
  5.     O 2 STDOUT will be in UTF-8
  6.     E 4 STDERR will be in UTF-8
  7.     S 7 I + O + E
  8.     i 8 UTF-8 is the default PerlIO layer for input streams
  9.     o 16 UTF-8 is the default PerlIO layer for output streams
  10.     D 24 i + o
  11.     A 32 the @ARGV elements are expected to be strings encoded
  12.     in UTF-8
  13.     L 64 normally the "IOEioA" are unconditional, the L makes
  14.     them conditional on the locale environment variables
  15.     (the LC_ALL, LC_TYPE, and LANG, in the order of
  16.     decreasing precedence) -- if the variables indicate
  17.     UTF-8, then the selected "IOEioA" are in effect
  18.     a 256 Set ${^UTF8CACHE} to -1, to run the UTF-8 caching
  19.     code in debugging mode.
复制代码

论坛徽章:
0
3 [报告]
发表于 2014-03-03 11:13 |只看该作者
回复 2# rubyish


    非常感谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP