[Pkg-bluetooth-maintainers] Bug#514841: gnome-bluetooth: gnome-obex-send doesn't send a file correctly if the filename contains non-ASCII characters.

Morita Sho morita-pub-en-debian at inz.sakura.ne.jp
Wed Feb 11 12:15:27 UTC 2009


Hmm..., it looks like the problem is not in gnome-obex-send.
There is no character encoding conversion codes in the source code of
gnome-obex-send.

Perhaps, the problem is in libbtctl.
In the function btctl_obexclient_source_push, it calls OBEX_CharToUnicode to
convert a filename to Unicode as following.

libbtctl-0.10.0/src/obex-client-source.c:
gboolean
btctl_obexclient_source_push (BtctlObexclientSource *bc,
		gchar *fname, const guchar * data, guint len)
{
...snip...
	bfname = g_path_get_basename (fname);
	uname_size = (strlen (bfname)+1)*2;
	uname = g_malloc (uname_size);
	OBEX_CharToUnicode (uname, bfname, uname_size);


OBEX_CharToUnicode converts a string to an Unicode string, however that function
seems not support non-ASCII or multibyte encoding.
Therefore it breaks non-ASCII characters.

I suggest to call g_convert instead of OBEX_CharToUnicode to support non-ASCII
or multibyte encoding.
I have attached a patch.

Regards,

-- 
Morita Sho <morita-pub-en-debian at inz.sakura.ne.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libbtctl-0.10.0-unicode-fix.patch
Type: text/x-patch
Size: 808 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-bluetooth-maintainers/attachments/20090211/6ef2bb6d/attachment.bin 


More information about the Pkg-bluetooth-maintainers mailing list