[Patch] multibyte encodings in strings
Nick Clifton
nickc@redhat.com
Tue Nov 13 15:02:00 GMT 2018
Hi Mathias,
>> correct ? I was kind of expecting the output to be "String1"
>> and "String2".
>
> Yes the output should be "String1" and "String2". As I am getting the expected
> output on all my systems it is difficult for me to guess what is going wrong.
Ah, so if "strings -el" is working for you, then at least I can be sure that
I applied the patch correctly.
> It looks as if your system accepts "aa53" as a printable utf-16-le char.
> Could you please run
>
> echo "aa53007400720069006e0067003100aa53007400720069006e0067003200bb" | xxd -p -r | ./strings -el | xxd
>
> to check if an additional character gets printed after "String1"
If by "additional" you mean a period character then yes:
00000000: 5374 7269 6e67 310a 5374 7269 6e67 320a String1.String2.
> and run
>
> echo "aa53007400720069006e00670031000053007400720069006e0067003200bb" | xxd -p -r | ./strings -el
Gives:
String1
String2
> echo "aa53007400720069006e0067003100aabbcc53007400720069006e0067003200bb" | xxd -p -r | ./strings -el
Gives the same:
String1
String2
> to check if these yield the expected results?
Which I assume is not right. Presumably this is due to my environment. In particular
I have LC_CTYPE=C which I think affects character display, right ?
Cheers
Nick
More information about the Binutils
mailing list