aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-09-25 20:53:14 +0000
committerTom Tromey <tromey@redhat.com>2009-09-25 20:53:14 +0000
commitb8899f2b6861deda28ccc10d925105e7e516d68b (patch)
tree71860a04741deb562bfb6abdddc2840953369f27 /gdb/c-lang.c
parentfe2d172ccbde84427ab164b885a0df6c9e21f9a0 (diff)
downloadgdb-b8899f2b6861deda28ccc10d925105e7e516d68b.zip
gdb-b8899f2b6861deda28ccc10d925105e7e516d68b.tar.gz
gdb-b8899f2b6861deda28ccc10d925105e7e516d68b.tar.bz2
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.
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r--gdb/c-lang.c14
1 files changed, 7 insertions, 7 deletions
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;