diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2025-10-18 19:06:52 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2025-10-18 19:06:52 +0200 |
commit | 27dae84ed92f1ef0300263091972338d12e78348 (patch) | |
tree | 7c52931f474fafb8a4bd4fd15ca3461c77cdecc2 /lib/iconv_open.c | |
parent | 4682deeb62247d34de87f8e777f99e2d337fd377 (diff) |
New upstream version 1.4.1upstream/1.4.1upstream
Diffstat (limited to 'lib/iconv_open.c')
-rw-r--r-- | lib/iconv_open.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/iconv_open.c b/lib/iconv_open.c index 2be02eff..c54b8ee6 100644 --- a/lib/iconv_open.c +++ b/lib/iconv_open.c @@ -1,5 +1,5 @@ /* Character set conversion. - Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -33,8 +33,6 @@ #define ICONV_FLAVOR_AIX "iconv_open-aix.h" #define ICONV_FLAVOR_HPUX "iconv_open-hpux.h" -#define ICONV_FLAVOR_IRIX "iconv_open-irix.h" -#define ICONV_FLAVOR_OSF "iconv_open-osf.h" #define ICONV_FLAVOR_SOLARIS "iconv_open-solaris.h" #define ICONV_FLAVOR_ZOS "iconv_open-zos.h" @@ -53,8 +51,6 @@ rpl_iconv_open (const char *tocode, const char *fromcode) #if REPLACE_ICONV_UTF /* Special handling of conversion between UTF-8 and UTF-{16,32}{BE,LE}. - Do this here, before calling the real iconv_open(), because OSF/1 5.1 - iconv() to these encoding inserts a BOM, which is wrong. We do not need to handle conversion between arbitrary encodings and UTF-{16,32}{BE,LE}, because the 'striconveh' module implements two-step conversion through UTF-8. @@ -71,7 +67,7 @@ rpl_iconv_open (const char *tocode, const char *fromcode) && c_toupper (tocode[2]) == 'F' && tocode[3] == '-') { - if (strcmp (fromcode + 4, "8") == 0) + if (streq (fromcode + 4, "8")) { if (c_strcasecmp (tocode + 4, "16BE") == 0) return _ICONV_UTF8_UTF16BE; @@ -82,7 +78,7 @@ rpl_iconv_open (const char *tocode, const char *fromcode) if (c_strcasecmp (tocode + 4, "32LE") == 0) return _ICONV_UTF8_UTF32LE; } - else if (strcmp (tocode + 4, "8") == 0) + else if (streq (tocode + 4, "8")) { if (c_strcasecmp (fromcode + 4, "16BE") == 0) return _ICONV_UTF16BE_UTF8; @@ -115,8 +111,7 @@ rpl_iconv_open (const char *tocode, const char *fromcode) } /* Convert the encodings to upper case, because - 1. in the arguments of iconv_open() on AIX, HP-UX, and OSF/1 the case - matters, + 1. in the arguments of iconv_open() on AIX and HP-UX, the case matters, 2. it makes searching in the table faster. */ { const char *p = fromcode; |