开发者

Why %date% in xml gets replaced by Úte%?

writting an MSBuild script I have found a problem. I'm creating a batch file from the script and I'm writting into it the following sentence:

echo %date% - %time%

But at the batch file I get:

echo Úte% - %time%

As far as I know the escape character is 开发者_运维技巧& not %. How can I fix this problem?

Thanks in advance.


http://msdn.microsoft.com/en-us/library/ms228186(v=vs.80).aspx

After having a peek around this msdn site says that % is an escape character. When you do %xx is uses xx for the Hex code.


It's being interpreted as %da in the same manner as URL escaping. Why it's doing that, and why it's doing it to the first entry on the line only, I have no idea.

From the link posted in the other answer, try "%25date%25"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜