开发者

command line byte sequence

开发者 https://www.devze.com 2022-12-15 11:40 出处:网络
How do you express a byte sequence from the command line? i.e like you would in PHP开发者_StackOverflow社区 with the following:

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

精彩评论

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

关注公众号