<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40043 >

Egor Vyscrebentsov wrote:
> Maybe I can't say what I want. Trying again:
> strlen couldn't be used for receiving number of alphabetic characters
> in the string. It can be used for receiving number of 7-bit signed integer.
> And my point is that usage strlen to get number of "alphabetic characters"
> IS and WILL BE an issue with UTF-8.
>  
Let's say we are in violent agreement.  This is not and never has been
correct usage of strlen().  The current code is wrong.


> The purpose of wordwrap_string function is to make human-readable break
> in string line, isn't it? (I do not say here if it right or not to make
> such breaks.)
> 
And I'm saying that it is wrong ("not right").  I'm comfortable making
value judgments based on empirical evidence.

And, as currently implemented, is impossible for languages that don't use
blank spaces as dividers between "words".

It is the responsibility of the developers to make the human-readable
line breaks in the canonical form message.  It is the responsibility of the
translators to make the human-readable line breaks in other places based on
their language.

As to whether there are other places with similar bad code, that may be
true, but it doesn't mitigate the fact that this needs to be fixed.  We'll
fix the others as they are discovered.



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to