This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: [RFC] Adjust output for strings in tree-pretty-print.c


FX wrote:
I think the best thing to do is to have a langhook then.

It seems a bit weird to have a langhook for a one-character difference, but if there's a consensus on it, I'll go along.

To me too, but I still maintain that it's better to print in UTF-8 (which would make the langhook more useful). The recent Unicode patches for C possibly could use the langhook too.


Endianness issues may also appear.  Maybe you should call iconv in the
langhook to get back to UTF-8, and print that representation instead.

Endianness is already take care of, in the sense that the string is encoded in the target's endianness already.

But for testing you want a standardized endianness. Otherwise some targets will need to scan "I\0\0\0" and others will need to scan "\0\0\0I".


However, that makes
calling iconv more difficult, because that has us going from target's
endianness to UTF-8, which will be a pain.

No, you can use UTF-32BE and UTF-32LE encodings.


Paolo


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