[Freeciv-Dev] Re: (PR#7317) Add Unicode support to Freeciv
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7317 >
On Sun, 25 Jan 2004, Raimar Falke wrote:
> - ucs2 and ucs4 are fixed length encodings
What are these? I have never heard anything about them before.
> I now argue that the "variable length" is the issue which causes some
> of the issues in the past and also will cause us problems in the
> future. In the network code and in the server we want to ensure that
> the received strings have a sane length. For this we static buffers
> and functions like strncpy. Here utf8 shows it's problems. How do you
> dimension these buffers? You would have to take the conservative
> approach of the worst-case (multiple their size by 4). We have also
> seen the problems of truncated utf8 strings.
What about utf-16 and utf-32? utf-32 is fixed-length, afaik. If we only
use the first 16 bits worth of characters, utf-16 should be fixed-length
too.
- Per
|
|