From 0bcfdbeb50b2435b848ea1fd50ccc79ba64fd129 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 7 Jun 2005 21:29:26 +0000 Subject: [project @ 2005-06-07 21:29:26 by jmb] Lose cnv_str_local_enc and friends. UTF-8 conversion functions now return an enumerated type allowing for fallbacks, if appropriate. svn path=/import/netsurf/; revision=1744 --- utils/utils.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'utils/utils.c') diff --git a/utils/utils.c b/utils/utils.c index 03145df2d..0632b2318 100644 --- a/utils/utils.c +++ b/utils/utils.c @@ -103,40 +103,6 @@ char *cnv_space2nbsp(const char *s) return d; } -/** - * Convert local encoding to NUL terminated UTF-8 string. - * Caller needs to free return value. - * - * \param s string in local machine encoding. NUL or length terminated (which comes first). - * \param length maximum number of bytes to consider at s. - * \return malloc()'ed NUL termined string in UTF-8 encoding. - */ -char *cnv_local_enc_str(const char *s, size_t length) -{ - return utf8_from_enc(s, local_encoding_name(), length); -} - - -/** - * Converts NUL terminated UTF-8 string to the machine local encoding. - * Caller needs to free return value. - */ -char *cnv_str_local_enc(const char *s) -{ - return cnv_strn_local_enc(s, 0); -} - - -/** - * Converts UTF-8 string of bytes to the machine local encoding. - * Caller needs to free return value. - */ -char *cnv_strn_local_enc(const char *s, int length) -{ - return utf8_to_enc(s, local_encoding_name(), length); -} - - /** * Check if a directory exists. */ -- cgit v1.2.3