Antonio Macchi wrote:
>
> $ a=$'\xd9\xbf'
>
> $ echo ${#a}
> 1
>
> $ a2=${a:0:1}
>
> $ echo ${#a2}
> 1
>
>
>
>
> this two characters are "j" and "k" graphical characters in linux
> terminal/console
>
> I need to extract only one... but apparently I can't.
Those two bytes happen to compos
This message was cancelled from within Mozilla.
This message was cancelled from within Mozilla.
Antonio Macchi wrote:
$ a=$'\xd9\xbf'
$ echo ${#a}
1
$ a2=${a:0:1}
$ echo ${#a2}
1
ops... I mean...
$ a2=${a:0:1}
$ hexdump -C <(echo $a2)
d9 bf 0a |...|
0003
seems bash can't break this two characters...
$ a=$'\xd9\xbf'
$ echo ${#a}
1
$ a2=${a:0:1}
$ echo ${#a2}
1
this two characters are "j" and "k" graphical characters in linux
terminal/console
I need to extract only one... but apparently I can't.