[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24990 - gnunet/src/namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24990 - gnunet/src/namestore |
Date: |
Fri, 16 Nov 2012 09:51:06 +0100 |
Author: wachs
Date: 2012-11-16 09:51:06 +0100 (Fri, 16 Nov 2012)
New Revision: 24990
Modified:
gnunet/src/namestore/namestore.h
gnunet/src/namestore/namestore_common.c
Log:
-change to normalization
Modified: gnunet/src/namestore/namestore.h
===================================================================
--- gnunet/src/namestore/namestore.h 2012-11-15 16:52:23 UTC (rev 24989)
+++ gnunet/src/namestore/namestore.h 2012-11-16 08:51:06 UTC (rev 24990)
@@ -32,7 +32,7 @@
#define MAX_NAME_LEN 256
/**
- * Convert a string from to local codeset to UTF-8 lowercase
+ * Convert a UTF-8 string to UTF-8 lowercase
* @param src source string
* @return converted result
*/
Modified: gnunet/src/namestore/namestore_common.c
===================================================================
--- gnunet/src/namestore/namestore_common.c 2012-11-15 16:52:23 UTC (rev
24989)
+++ gnunet/src/namestore/namestore_common.c 2012-11-16 08:51:06 UTC (rev
24990)
@@ -72,22 +72,18 @@
GNUNET_NETWORK_STRUCT_END
/**
- * Convert a string from to local codeset to UTF-8 lowercase
+ * Convert a UTF-8 string to UTF-8 lowercase
* @param src source string
* @return converted result
*/
char *
GNUNET_NAMESTORE_normalize_string (const char *src)
{
- char *utf_8_str;
-
GNUNET_assert (NULL != src);
- /* Convert to UTF8 */
- utf_8_str = GNUNET_STRINGS_to_utf8 (src, strlen (src), nl_langinfo
(CODESET));
- GNUNET_assert (NULL != utf_8_str);
+ char *res = strdup (src);
/* normalize */
- GNUNET_STRINGS_utf8_tolower(utf_8_str, &utf_8_str);
- return utf_8_str;
+ GNUNET_STRINGS_utf8_tolower(src, &res);
+ return res;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24990 - gnunet/src/namestore,
gnunet <=