Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] (PR#7226) 1.14.1 still has character-set problems !
Home

[Freeciv-Dev] (PR#7226) 1.14.1 still has character-set problems !

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7226) 1.14.1 still has character-set problems !
From: "Константин Углеков" <ukv1@xxxxxxx>
Date: Fri, 9 Jan 2004 07:45:25 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7226 >

Hi! 

In addition to  bug #7046  (sorry for my english)

Locale settings are ru_RU.KOI8-R for client and server; server is local.

civclient (Gtk2) output seems similar to #7046 :

1: Не могу найти файл спецификации звуков "stdsounds".
1: Чтобы получить звук, сгрузите набор звуков!
1: Игра: Сгрузите наборы звуков из 
<ftp://ftp.freeciv.org/freeciv/contrib/sounds/sets>.
1: Продолжим с выключенным звуком.
2: LANGUAGE="ru-ru"
1: received bad string in packet (type 71, len 41) from server
1: received bad string in packet (type 71, len 36) from server
1: received bad string in packet (type 71, len 36) from server
1: received bad string in packet (type 71, len 44) from server
1: Translated name is too long, truncating: Мостостроительство
... < more truncated names > ...


And many messages: 

** (civclient:12914): WARNING **: Invalid UTF8 string passed to 
pango_layout_set_text()

when city dialog opened.


Another bug - in progress bar in city overview/city production, and in city 
production (Ctrl-P) on main screen: sometimes only wonder (or city improvement) 
name printed, without "%d/%d  %d turns" suffix.

I think all of these errors came from sz_loud_strlcpy() . They can truncate 
UTF-8 string on half of two-byte character (and really DO it in russian locale).

Increasing value MAX_LEN_NAME from 32 to 64 prevents russian names from such 
kind of truncating, and  practically all of these errors vanished. Only 

.... WARNING **: Invalid UTF8 string passed to pango_layout_set_text()

 appears, but more rarely (when city dialog opened first time, and always when 
city/CMA dialog selected).

Another bad way to fix the problem: restrict national names to MAX_LEN_NAME/2.

Good way, I think: check truncated string, and delete last byte if it is the 
part of wide character.




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#7226) 1.14.1 still has character-set problems !, Константин Углеков <=