patchmldonkey, a multi-networks file-sharing client - Patches: patch #3304, UTF 8 encoding for strings from...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #3304: UTF 8 encoding for strings from the core in gtk2/newgui

Submitter:  Sylvain Le Gall <gildor>
Submitted:  Thu 19 Aug 2004 07:25:37 PM UTC
   
 
Category:  None Priority:  1 - Later
Status:  Done Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Sun 20 Feb 2005 02:51:20 AM UTC, comment #6: 

applied 2-5-28-1

spiralvoice <spiralvoice>
Group administrator
Sun 23 Jan 2005 01:02:45 PM UTC, comment #5: 

has to wait for a buildsystem cleanup

Amorphous <amorphous>
Mon 23 Aug 2004 02:46:39 AM UTC, comment #4: 

GTK2 newgui from CVS 2-5-28 with a 2-5-16t core does not connect when non-ASCII characters are transmitted:

Decoding gui proto[26]: exception Glib.Convert.Error(1, "Invalid byte sequence in conversion input"), opcode 52

This is then followed by a long dump of ascii and dec data, then this:

Exception Glib.Convert.Error(1, "Invalid byte sequence in conversion input") in decode/exec

GUI disconnects from the core, I can´t do anything to avoid this error because the character (dec-ascii 228) is not in the filename itself, instead it is present in one of the many alternative names of that file which I can´t change.

spiralvoice <spiralvoice>
Group administrator
Mon 23 Aug 2004 02:27:35 AM UTC, comment #3: 

It seems to me that this patch break building GTK1 newgui:

File "src/gtk/newgui/gui_com.ml", line 75, characters 27-72:
This expression has type
  (string -> string) -> Buffer.t -> GuiProto.from_gui -> unit
but is here used with type Buffer.t -> 'a -> 'b
make: * [src/gtk/newgui/gui_com.cmx] Error 2

This is because parameters of guiEncoding.from_gui have been expanded but GTK1 newgui does not use this:

-let from_gui (proto : int array) opcode s =
+let from_gui (proto : int array) charset opcode s =

spiralvoice <spiralvoice>
Group administrator
Sun 22 Aug 2004 11:48:12 PM UTC, comment #2: 

I update the patch for 2.5.28.

Now it fits the dpatch specification ( use -patch to patch ).

Regard
Sylvain Le Gall

Sylvain Le Gall <gildor>
Thu 19 Aug 2004 11:00:04 PM UTC, comment #1: 

This patch needs to be applied with -R option (mixed dirs) and does not apply to CVS 2-5-28:-(

spiralvoice <spiralvoice>
Group administrator
Thu 19 Aug 2004 07:25:37 PM UTC, original submission:  

Well,

This is pretty a big patch and one which solve could solve
some issues :
I add a function charset in guiEncoding/guiDecoding which enables a communication following a certain encoding.

For now i only use it on the mlgui side : it converts
strings from the core from locale to UTF-8 ( GTK2 only support UTF 8 strings ).

But i think it should be better to have mlnet send is
string to the gui in UTF-8 ( ie to convert it on the
mlnet side ). UTF-8 permits to encode a lot more characters
than ISOXXX.

Moreover, mlgui don't know the locale of mlnet. So if you want a precise conversion from ISOXXX to UTF 8 in the
communication between mlgui and mlnet you have two choice :
- create a message in the mlgui/mlnet communication to i
inform the gui that we are using this or this locale ( ISOXXX )
- use UTF 8 for the communication

The choice is up to you :
- you can let things as they are in the patch ( in driverInterface : charset = fun s -> s and in gui_comm charset_from_gui = Glib.Convert.locale_from_utf8 and charset_to_gui = Glib.Convert.locale_to_utf8 )
- you can use the UTF 8 solution ( just inverse gui_comm and  driverInterface definition )

Kind regard
Sylvain Le Gall

Sylvain Le Gall <gildor>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #7832:  18_utf8_encoding.dpatch added by gildor (72KiB - application/octet-stream)
file #7790:  18_utf8_encoding.dpatch added by gildor (67KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 7 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-02-20 spiralvoice StatusPostponed Done
    Open/ClosedOpen Closed
2005-01-23 amorphous StatusNone Postponed
2004-11-03 spiralvoice Attached File#3587 Removed
2004-09-03 gildor Attached File- Added 18_utf8_encoding.dpatch, #3636
2004-08-22 gildor Attached File- Added 18_utf8_encoding.dpatch, #3594
2004-08-19 gildor Attached File- Added utf8.patch, #3587

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code