James Kanze
11/29/2008 12:58:00 PM
On Nov 28, 8:39 pm, Hendrik Schober <spamt...@gmx.de> wrote:
> James Kanze wrote:
> > On Nov 28, 12:44 pm, Hendrik Schober <spamt...@gmx.de> wrote:
> >> James Kanze wrote:
> >>> On Nov 28, 12:05 am, Paavo Helde <pa...@nospam.please.ee> wrote:
> >>> [...]
> >>>> If you are coding for Windows only, then the wise thing
> >>>> (which does not mean I'm actually recommending it!) would
> >>>> be to use their TCHAR and friends, they most probably
> >>>> will remain back-compatible to some extent.
> >>> The problem is that they promote a lie; the give the
> >>> impression that you can easily switch to and from Unicode,
> >>> just by changing a typedef.
> >> I've done this, although not using 'TCHAR', and across
> >> several platforms. What makes this impossible IYO?
> > The fact that the way the encodings work is different.
> Um, I guess the confusion stems from your "just by changing
> a typedef". Of course, there's a lot more required than just
> changing a typedef, but it can be done so that just changing
> a typedef does all this. I suppose you referred to the former
> (it needs more), while I referred to the latter (it can be
> done so that changing a typedef does everything that needs to
> be done).
If all of the manipulation (starting with just incrementing)
goes through functions, and you have overloads for these
functions, with different implementations, then you're probably
right. The idea that the typedef seems to give, however, is
that that's all that changes.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34