> wchar_t is a very wrong thing to normalize to, because it is OS and
> locale dependent.

MA> Well, then what's it good for?

Not much.

MA> Maybe we misunderstand each other. Perhaps if I tell you exactly
MA> what I'm trying to do you can just tell me how I should do it?

You've got two solutions.

One is to test for __STDC_ISO_10646__ at compile time, and refuse to
build if it is not set.  This is not different from all the code that
refuses to compile if _POSIX_SAVED_IDS is not defined.

The other is to 

  typedef unsigned long uchar_t;

and write your own code to operate on uchar_t, which is not as
difficult as it may seem (the only issue being with printf and scanf,
which cannot be easily wrapped).

Of course, you could combine the two by doing

  #ifdef __STDC_ISO_10646__
    typedef whar_t uchar_t;
  #else
    typedef unsigned long uchar_t;
  #endif

and writing everything twice.  This is only recommended if you are
paid by the line.

                                        Juliusz

P.S. What about converting all of your code to Bruno's CLISP?
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to