This is the mail archive of the 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]

Re: Merge cpplib and front end hashtables, part 1

Zack Weinberg wrote:-

> I don't think it's feasible for us to use the C89 or even C99
> multibyte primitives at all.  They are too underspecified to be of
> use.  iconv has approximately the right interface, although it's
> geared to bulk conversion not char-by-char processing and is therefore
> too heavyweight ... but then, so are the <wchar.h> primitives.  Bleah.

I think we should go for translating the whole file in one go, at
least initially.  cpplib can then cache the translated buffer, rather
than the buffer itself - obviously a big win.

The only problems I see with this are users wanting strings and
character constants to be converted back to the original charset.  But
it's too good an optimisation to lose easily.

What is our execution charset going to be?  UTF8?  We could always
translate back, depending on, say, a command-line flag or some extra
flag indicated in the same place as the source charset.  I'm not sure
whether this would lose information in some cases, though.

Can we decide on a execution charset?  At least then I might be able
to start on something with a concrete goal in mind.


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