This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] multibyte encodings in strings


Hi Nick,

> > 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.

As the period is just a placeholder for the newline (0x0a) the output would be

String1
String2

Which is correct.
 
> >     echo "aa53007400720069006e00670031000053007400720069006e0067003200bb" | xxd -p -r | ./strings -el
> 
> Gives:
> 
> String1
> String2
> 
> >     echo "aa53007400720069006e0067003100aabbcc53007400720069006e0067003200bb" | xxd -p -r | ./strings -el
> 
> Gives the same:
> 
> String1
> String2

All commands should give

String1
String2

So to me it looks like everything works just fine. If you can reproduce the
conditions where the output is "String1" and "tring2" please let me know.
Otherwise it should be ok to change the testcase to expect "String1" and
"String2"

Thanks a lot
Mathias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]