Windows批处理输出一个换行符女性角色 [英] Windows batch outputs a line feed female character
问题描述
这是额外的换页符打印出来,在一个女性符号的形式,所有的bash脚本。
An extra form feed character is printed out in all bash scripts in the form of a "female symbol".
- 字符:♀
- 数值code:&放大器;#9792;
- 六角code:&放大器;#x2640;
- Character: ♀
- Numerical code: ♀
- Hex code: ♀
的主要问题是这种形式AR不可打印的字符饲料。作为proccess路径等,大部分的bash脚本有形式饲料和碰撞没有实施过滤机制。
The main issue is that form feeds ar not printable characters. As such, most bash scripts that proccess paths have no filtering mechanisms implemented for form feeds and crash.
我试图建立一个APK使用Ant工具和女性的象征打破了脚本机器人。
I am trying to build an APK for android using the Ant tool and the female symbol breaks the scripts.
我还可以看到从bash中运行的所有PHP脚本女性的象征。下面是一个简单的测试脚本:
I can also see the female symbol in all PHP scripts run from bash. Below is a simple test script:
if (isset($argv[1])) {
echo "\nString\n";
} else {
passthru('php -f ' . __FILE__ . ' arg1');
}
当我跑这条线 PHP -f script.php的
(其中的script.php 包含code以上)的输出如下:
When I run this line php -f script.php
(where the script.php contains the code above) the output is the following:
♀
String
所以再次,这不是一个具体的程序问题,这是整个系统的。我也没能重现另一台机器上。
So once again, this is not a program-specific issue, it is system-wide. And I have failed to reproduce it on another machine.
我一直在寻找的答案,什么可能导致此一个星期左右,但没有成功。
I have been searching for an answer to what might cause this for about a week with no success.
你知道什么可能是这个根源?
Do you know what might be the root cause of this?
推荐答案
我有类似的问题,今天换代码:
I've got similar problem today with form feed symbol:
for /f "tokens=1,2 delims=!" %a in ('echo test') do (set RELAY=%a)
C:\>echo %RELAY%
♀test
问题是在cmd中的自动运行命令CLS。
startup.bat启动:
The problem was CLS command in the AutoRun of cmd. startup.bat:
@echo off
doskey ps=C:\tools\tasklist_by_name.bat $1
doskey kill=C:\tools\taskkill_by_pid.bat $1
doskey list=doskey /macros$bsort
cls
它运行与此
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
AutoRun "C:\tools\startup.bat"
当我删除CLS命令没关系。
您可以检查您的系统上,可能自动运行设置就可以了。
When I remove CLS command it's OK. You can check it on your system, maybe AutoRun is set on it.
这篇关于Windows批处理输出一个换行符女性角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!