[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 Tue, Apr 27, 2004 at 02:10:03AM -0400, Jason Dorje Short wrote:
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?
A assume that the internal encoding for the server is known and may be
different to the network encoding. So you have to convert both types
anyway.
1. No, the internal encoding for the server need not be different from
the network encoding.
2. There is no reason you'd need to convert ascii anyway. Doing so is
a bad idea.
3. Even if you did have to convert both types, you'd still need to know
which was which since they have to be converted differently.
And why do you want to turn ascii into utf-16 and double the network
packet size?
Because it is better for the maintainability that you only have one
type. It may be better to use utf-8 for the network. Tests have to
done.
But this is impossible anyway since we _don't_ have only one type.
IMO we are therefore better off making a clean split. This assures that
everyone knows just which type of string they are dealing with.
jason
|
|