Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#1824) ruleset data is in incompatible charsets
Home

[Freeciv-Dev] Re: (PR#1824) ruleset data is in incompatible charsets

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Kenn.Munro@xxxxxxxxxxxxxx, jdorje@xxxxxxxxxxxxxxxxxxxxx, jdwheeler42@xxxxxxxxx, jrg45@xxxxxxxxxxxxxxxxx, pawel@xxxxxxxxxxxxxxx, per@xxxxxxxxxxx
Cc: mrproper@xxxxxxxxxx, jlangley@xxxxxxx
Subject: [Freeciv-Dev] Re: (PR#1824) ruleset data is in incompatible charsets
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sat, 8 May 2004 01:18:15 -0700
Reply-to: rt@xxxxxxxxxxx

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

On Fri, May 07, 2004 at 11:32:30AM -0700, Jason Short wrote:
> So with these changes the flow chart becomes much simpler.  See
> http://freeciv.org/~jdorje/iconv.png.
> 
> Strings are stored in the server in unicode.  In the client they are
> stored in the GUI encoding.

There is a big error and a problem in this.

The error is that GUI encoding will work with the functions in
common/. We know from the past that this isn't the case. And it will
also not be the case if the GUI encoding is latin1 (xaw) and the
encoding used by common/ is utf8. The client and the server core needs
the same encoding.

The problem here is that the common client code can't convert into the
GUI encoding since the function signatures have to change for
different encodings. For ASCII and utf8 it is "char *" for utf16 and
ucs2 it is however "short int *".

I think most of this stems from the fact that you want to reuse the
hack done for gtk2.

I have drawn my own version how it should be done:
http://www.freeciv.org/~rfalke/iconv-rf.png

In my version more work have to be done for gtk2 but it is possible to
get gui-sdl and gui-fs work. Also the encapsulation is quite good. And
it uses less arrows ;)

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "> WHY?! Isn't it better to put $(shell cat cscope.files) on the list of
  I only have a yellow belt in makefile kungfu.  These fancy gnu make things
  are relatively new to some of us..."
    -- Mark Frazer to Vassilii Khachaturov in linux-kernel

#FIG 3.2
Landscape
Center
Metric
A4      
100.00
Single
-2
1200 2
2 1 0 4 12 7 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         9846 11367 7632 14831
2 1 0 4 26 7 50 -1 -1 0.000 0 0 -1 1 1 2
        0 0 4.00 240.00 480.00
        0 0 4.00 240.00 480.00
         9757 8360 6310 8360
2 1 0 4 1 23 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         2431 9866 5002 11847
2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 1 2
        0 0 4.00 240.00 480.00
         1895 9812 2770 11632
2 2 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
         9476 7012 11726 7012 11726 9487 9476 9487 9476 7012
2 1 0 4 1 23 50 -1 -1 0.000 0 0 -1 1 1 2
        0 0 4.00 240.00 480.00
        0 0 4.00 240.00 480.00
         4645 8407 2127 8435
2 2 0 4 1 23 50 -1 -1 0.000 0 0 -1 0 0 5
         1376 6967 2726 6967 2726 10117 1376 10117 1376 6967
2 2 1 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5
         1106 6382 6956 6382 6956 13132 1106 13132 1106 6382
2 2 0 4 0 23 50 -1 -1 0.000 0 0 -1 0 0 5
         7001 1207 8036 1207 8036 2197 7001 2197 7001 1207
2 3 1 4 0 7 50 0 -1 3.000 0 0 -1 0 0 6
         7451 2782 6776 3457 7451 4132 8126 3457 7451 2782 7451 2782
2 1 0 4 1 23 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         7431 4114 8163 4864
2 1 0 4 0 23 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         7484 1899 7431 2792
2 1 0 4 0 23 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         9596 1949 9596 3003
2 1 0 4 1 23 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         9632 4092 8109 4846
2 2 1 4 0 23 50 -1 -1 10.000 0 0 -1 0 0 5
         2895 346 6045 346 6045 2596 2895 2596 2895 346
2 2 0 4 0 23 50 -1 -1 0.000 0 0 -1 0 0 5
         3681 1171 4716 1171 4716 2161 3681 2161 3681 1171
2 1 0 4 0 23 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         4216 2007 7091 3132
2 1 0 4 1 23 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         8091 4810 1913 7489
2 1 0 4 12 12 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         6560 14992 3270 12364
2 1 0 4 12 23 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         5681 12525 7239 14813
2 3 1 4 0 7 50 0 -1 3.000 0 0 -1 0 0 6
         2963 11455 2288 12130 2963 12805 3638 12130 2963 11455 2963 11455
2 3 1 4 0 7 50 0 -1 3.000 0 0 -1 0 0 6
         5363 11564 4688 12239 5363 12914 6038 12239 5363 11564 5363 11564
2 2 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
         6506 10015 4272 10015 4272 6832 6506 6832 6506 10015
2 2 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
         12239 9555 14729 9555 14729 6873 12239 6873 12239 9555
2 1 0 4 1 23 50 -1 -1 0.000 0 0 -1 1 1 2
        0 0 4.00 240.00 480.00
        0 0 4.00 240.00 480.00
         13074 8150 11042 8194
2 1 0 4 1 23 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         8185 4808 13400 7076
2 1 0 4 1 23 50 -1 -1 0.000 0 0 -1 1 0 2
        0 0 4.00 240.00 480.00
         12400 9398 10435 10617
2 2 1 4 0 23 50 -1 -1 10.000 0 0 -1 0 0 5
         6731 360 10953 360 10953 2647 6731 2647 6731 360
2 2 0 4 0 23 50 -1 -1 0.000 0 0 -1 0 0 5
         9132 1217 10212 1217 10212 2072 9132 2072 9132 1217
2 3 1 4 0 7 50 0 -1 3.000 0 0 -1 0 0 6
         9596 2789 8921 3464 9596 4139 10271 3464 9596 2789 9596 2789
2 1 0 4 1 23 50 -1 -1 0.000 0 0 -1 1 1 2
        0 0 4.00 240.00 480.00
        0 0 4.00 240.00 480.00
         13578 9331 13525 11139
2 3 1 4 0 7 50 0 -1 3.000 0 0 -1 0 0 6
         10203 10242 9528 10917 10221 11635 10878 10917 10203 10242 10203 10242
2 2 0 4 12 7 50 -1 -1 0.000 0 0 -1 0 0 5
         6363 14671 8163 14671 8163 16921 6363 16921 6363 14671
2 2 0 4 4 23 50 -1 -1 0.000 0 0 -1 0 0 5
         11739 13778 14042 13778 14042 15546 11739 15546 11739 13778
2 1 0 4 4 23 50 -1 -1 0.000 0 0 -1 1 1 2
        0 0 4.00 240.00 480.00
        0 0 4.00 240.00 480.00
         13614 14099 13542 12460
2 2 1 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5
         8935 6378 14953 6378 14953 16260 8935 16260 8935 6378
2 3 1 4 0 7 50 0 -1 3.000 0 0 -1 0 0 6
         13564 11106 12889 11781 13564 12456 14239 11781 13564 11106 13564 11106
2 2 1 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5
         6038 14186 8722 14186 8722 17833 6038 17833 6038 14186
2 3 1 4 0 7 50 0 -1 3.000 0 0 -1 0 0 6
         4815 15987 4140 16662 4815 17337 5490 16662 4815 15987 4815 15987
4 0 0 50 -1 0 18 0.0000 4 195 735 1196 6742 Server\001
4 0 0 50 -1 0 14 0.0000 4 150 435 1691 7327 Core\001
4 0 0 50 -1 0 12 0.0000 4 90 495 7271 1477 names\001
4 0 0 50 -1 0 18 0.0000 4 195 1050 7001 667 Data files\001
4 0 0 50 -1 0 14 0.0000 4 180 600 7055 3546 gettext\001
4 0 0 50 -1 0 18 0.0000 4 195 1335 3198 720 Source code\001
4 0 0 50 -1 0 14 0.0000 4 195 735 2567 12219 fc_scanf\001
4 0 0 50 -1 0 14 0.0000 4 195 780 4971 12293 fc_fprintf\001
4 0 0 50 -1 0 14 0.0000 4 150 780 4685 7290 Network\001
4 0 0 50 -1 0 18 0.0000 4 195 690 9298 6690 Client\001
4 0 0 50 -1 0 14 0.0000 4 150 780 9844 7381 Network\001
4 0 0 50 -1 0 14 0.0000 4 150 435 12583 7262 Core\001
4 0 0 50 -1 0 12 0.0000 4 135 330 9560 1621 data\001
4 0 0 50 -1 0 14 0.0000 4 105 420 9344 3529 conv\001
4 0 0 50 -1 0 14 0.0000 4 195 780 9791 11018 fc_fprintf\001
4 0 0 50 -1 0 14 0.0000 4 150 1290 11982 14282 Gui client code\001
4 0 0 50 -1 0 14 0.0000 4 105 420 13220 11857 conv\001
4 0 0 50 -1 0 18 0.0000 4 195 1530 518 14804 Ascii in black\001
4 0 1 50 -1 0 18 0.0000 4 195 1740 518 15134 Unicode in blue\001
4 0 4 50 -1 0 18 0.0000 4 255 2265 518 15464 GUI encoding in red\001
4 0 24 50 -1 0 18 0.0000 4 195 2010 518 16187 Network in brown\001
4 0 12 50 -1 0 18 0.0000 4 255 2640 554 15841 Local encoding in green\001
4 0 -1 50 -1 0 18 0.0000 4 255 3105 555 16736 conversions (iconv,gettext):\001
4 0 0 50 -1 0 18 0.0000 4 195 1050 6286 17625 Terminal\001

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