diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-11-16 08:51:06 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-11-16 08:51:06 +0000 |
commit | 246cd58943ccff6dd50bb10d5e01ea8ba4e2e0f5 (patch) | |
tree | a0e74ddb168b9ae761be003338a0786cdf5f29a0 /src/namestore | |
parent | b3ba1ad026ee22d0536ea6800334652394ceca5c (diff) |
-change to normalization
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/namestore.h | 2 | ||||
-rw-r--r-- | src/namestore/namestore_common.c | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/namestore/namestore.h b/src/namestore/namestore.h index 42cc2b2d18..0e7ecfda3b 100644 --- a/src/namestore/namestore.h +++ b/src/namestore/namestore.h @@ -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 */ diff --git a/src/namestore/namestore_common.c b/src/namestore/namestore_common.c index 4033748096..f81a287c3d 100644 --- a/src/namestore/namestore_common.c +++ b/src/namestore/namestore_common.c @@ -72,22 +72,18 @@ struct NetworkRecord 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; } |