Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7317) Add Unicode support to Freeciv
Home

[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]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7317) Add Unicode support to Freeciv
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 26 Jan 2004 00:44:44 -0800
Reply-to: rt@xxxxxxxxxxx

<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




[Prev in Thread] Current Thread [Next in Thread]