Skip to contentSkip to conversation

PATCH: handle unicode local device name

Bluez-devel Denis KENZIOR 3 participants 3 messages Nov 17, 2006 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hey,

This patch fixes a problem with storage.c turning unicode local device names into '.' dots.

-Denis

Index: storage.c
===================================================================
RCS file: /cvsroot/bluez/utils/hcid/storage.c,v
retrieving revision 1.43

storage.c 17 Nov 2006 03:53:12 -0000 renamed from storage.c 27 Oct 2006 14:43:23 -0000 1.43 +1 -1
diff -u -5 -r1.43 storage.c
@@ -119,11 +119,11 @@
        char filename[PATH_MAX + 1], str[249];
        int i;
 
        memset(str, 0, sizeof(str));
        for (i = 0; i < 248 && name[i]; i++)
-               if ((unsigned char) name[i] < 32 || name[i] == 127)
+               if ((unsigned char) name[i] < 32)
                        str[i] = '.';
                else
                        str[i] = name[i];
 
        create_filename(filename, PATH_MAX, bdaddr, "config");

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Denis,

Quoted 2 lines

This patch fixes a problem with storage.c turning unicode local device names into '.' dots.

the local device name is in UTF-8 and not unicode and we need to change to character 127 to not corrupt the storage format.

Regards

Marcel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw
Quoted 2 lines

the local device name is in UTF-8 and not unicode and we need to change to character 127 to not corrupt the storage format.

do you mean "not UCS-2" instead of "not unicode"?

-albert

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel