free (soutbuf);
iconv_close (bconv);
}
-
+
hmapx_insert (&map, converter, hash);
return converter;
for (i = 0 ; i < null_bytes ; ++i)
*out++ = '\0';
-
+
return out - 1 - out_;
}
{
struct substring out;
- if ( text == NULL )
+ if (text == NULL)
return NULL;
- if ( length == -1 )
+ if (length == -1)
length = strlen (text);
out = recode_substring_pool (to, from, ss_buffer (text, length), pool);
conv = create_iconv (to, from);
- if ( NULL == conv )
+ if (NULL == conv)
{
if (fallbackchar)
{
/* Attempts to set the encoding from a locale name
- returns true if successfull.
+ returns true if successful.
This function does not (should not!) alter the current locale.
*/
bool
loc_encoding = xstrdup (locale_charset ());
- if ( 0 == strcmp (loc_encoding, c_encoding))
+ if (0 == strcmp (loc_encoding, c_encoding))
{
ok = false;
}
{
iconv_t conv = iconv_open (UTF8, enc);
- if ( conv == (iconv_t) -1)
+ if (conv == (iconv_t) -1)
return false;
iconv_close (conv);
/* Return the system local's idea of the
- decimal seperator character */
+ decimal separator character */
char
get_system_decimal (void)
{
{
return utf8_casemap (s, u8_tolower);
}
+
+char *
+utf8_to_title (const char *s)
+{
+ return utf8_casemap (s, u8_totitle);
+}
\f
bool
get_encoding_info (struct encoding_info *e, const char *name)