diff -ur openobex-orig/lib/obex.c openobex-patch/lib/obex.c
--- openobex-orig/lib/obex.c	2007-04-30 13:44:53.000000000 -0500
+++ openobex-patch/lib/obex.c	2007-04-30 13:51:39.000000000 -0500
@@ -69,6 +69,9 @@
 typedef char *bdaddr_t;
 #endif
 
+#include <iconv.h>
+#include <locale.h>
+
 void OBEX_FreeInterfaces(obex_t *self);
 
 /**
@@ -859,24 +862,46 @@
  */
 int OBEX_CharToUnicode(uint8_t *uc, const uint8_t *c, int size)
 {
-	int len, n;
 	DEBUG(4, "\n");
-
+	int len = -1;
+	char const *locale = NULL;
+        iconv_t hConv;                                                                                                       
+		 
 	obex_return_val_if_fail(uc != NULL, -1);
 	obex_return_val_if_fail(c != NULL, -1);
+	
+	/* get current locale */
+	locale = setlocale(LC_CTYPE, "");
+	obex_return_val_if_fail(locale != NULL, -1);
+
+        if (strcmp(locale, "ASCII") == 0 ||
+	    strcmp(locale, "C") == 0 ||
+	    strcmp(locale, "POSIX") == 0 ||
+            strcmp(locale, "US-ASCII") == 0)
+	        locale = "en_US.US-ASCII";
+
+        locale = strchr(locale, '.');
+        obex_return_val_if_fail(locale != NULL, -1);
+
+        locale ++;
+        obex_return_val_if_fail(locale[0] != '\0', -1);
+
+	/* recode */
+	if ((iconv_t)-1 != (hConv = iconv_open("UCS-2BE", locale))) {
+	    size_t inBytes = strlen(c);
+	    size_t outBytes = size;
+
+	    if (((size_t)-1 != iconv(hConv, &c, &inBytes, &uc, &outBytes)) &&
+		(inBytes == 0) && (outBytes >= 2)) {
+		    len = size - outBytes;
+		    uc[len] = 0;
+		    uc[len + 1] = 0;
+		    len += 2;
+		}
 
-	len = n = strlen((char *) c);
-	obex_return_val_if_fail(n*2+2 <= size, -1);
-
-	uc[n*2+1] = 0;
-	uc[n*2] = 0;
-
-	while(n--) {
-		uc[n*2+1] = c[n];
-		uc[n*2] = 0;
+	    iconv_close(hConv);
 	}
-
-	return (len*2)+2 ;
+	return len;
 }
 
 /**
