[Freeciv-Dev] Re: inexplicable generate_packets error
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke wrote:
On Mon, Apr 26, 2004 at 02:25:38PM -0400, Jason Dorje Short wrote:
Raimar Falke wrote:
The type dataio type "string" is hardcoded.
So I see. It takes this patch to make the change fully.
I think the patch is the wrong direction. There just should not be two
string types.
Perhaps. But the current method of put_conv_callback/get_conv_callback
is broken because it converts all strings, including those which
shouldn't be converted. This can break the GTK client if the network
charset is not a superset of ASCII (which probably never happens).
So the alternative is to make these conversions manually for ALL
relevant packet fields. This can be done either when sending/receiving
the packets or when writing/reading data from the GUI. Either will take
many times more code.
And realize these string types are fundamentally different. Someday the
TEXT packets could use UTF-16. But the ASCII packets will always be ascii.
I don't see the problem handling both types the same way. I.e. you
wrap your ascii strings in UTF-16 and dewrap them at the receiving
side.
But how do you know which are which?
And why do you want to turn ascii into utf-16 and double the network
packet size?
jason
|
|