[Freeciv-Dev] Re: (PR#10935) Fatal Freeciv Server Crash
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10935 >
On Mon, 15 Nov 2004, Jason Short wrote:
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10935 >
>
> Vasco Alexandre da Silva Costa wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=10935 >
> >
> >>[use_less - Mon Nov 08 04:27:05 2004]:
> >>
> >>Here's a patch that casts the input to all the character functions in
> >>support.c to an unsigned char, then an int. Could probably use more
> >>useful comments, though.
> >
> > Here, I reimplemented ctype for you. :-)
>
> I think this is wrong. It won't recognize the relationship of
> lower-case and upper-case non-ascii characters.
Yes it doesn't. And neither do the Windows functions from what is written
into their help. The Linux functions may do this, but if they do they will
be broken for Freeciv. Why? These functions are made to work on the locale
encoding, and you are often passing UTF-8 bytes into them, oops.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
|
|