From b8899f2b6861deda28ccc10d925105e7e516d68b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 25 Sep 2009 20:53:14 +0000 Subject: gdb * charset.c (iconv_open): Use UTF-16 and UTF-32, not UCS-2 and UCS-4. (iconv): Rename 'ucs_flag'. (GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32. * c-lang.c (charset_for_string_type): Use UTF-16 and UTF-32, not UCS-2 and UCS-4. (convert_ucn): Use UTF-32. gdb/testsuite * gdb.base/charset.exp: Use UTF-16 and UTF-32, not UCS-2 and UCS-4. * gdb.base/charset.c (utf_32_string): Rename. (init_utf32): Rename. (main): Update. --- gdb/c-lang.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gdb/c-lang.c') diff --git a/gdb/c-lang.c b/gdb/c-lang.c index d01490c..64258de 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -52,17 +52,17 @@ charset_for_string_type (enum c_string_type str_type, case C_WIDE_STRING: return target_wide_charset (byte_order); case C_STRING_16: - /* FIXME: UCS-2 is not always correct. */ + /* FIXME: UTF-16 is not always correct. */ if (byte_order == BFD_ENDIAN_BIG) - return "UCS-2BE"; + return "UTF-16BE"; else - return "UCS-2LE"; + return "UTF-16LE"; case C_STRING_32: - /* FIXME: UCS-4 is not always correct. */ + /* FIXME: UTF-32 is not always correct. */ if (byte_order == BFD_ENDIAN_BIG) - return "UCS-4BE"; + return "UTF-32BE"; else - return "UCS-4LE"; + return "UTF-32LE"; } internal_error (__FILE__, __LINE__, "unhandled c_string_type"); } @@ -763,7 +763,7 @@ convert_ucn (char *p, char *limit, const char *dest_charset, result >>= 8; } - convert_between_encodings ("UCS-4BE", dest_charset, data, 4, 4, output, + convert_between_encodings ("UTF-32BE", dest_charset, data, 4, 4, output, translit_none); return p; -- cgit v1.1