开发者

command line byte sequence

How do you express a byte sequence from the command line? i.e like you would in PHP开发者_StackOverflow社区 with the following:

<?php
echo "\xC2\xA3"

usage: for passing a Unicode string to a script or program. The above example is the UK pound sign "£"


echo -e "\xC2\xA3"

or

echo $'\xc2\xa3'

the latter may be bash-specific, I don't remember.


$ printf "\xC2\xA3"
£
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜