diff -urN gcc-2.95.2.orig/gcc/c-common.c gcc-2.95.2/gcc/c-common.c
--- gcc-2.95.2.orig/gcc/c-common.c	Tue Sep  7 10:11:16 1999
+++ gcc-2.95.2/gcc/c-common.c	Fri Jul 21 09:34:03 2000
@@ -230,7 +230,10 @@
   register int length = 1;
   int wide_length = 0;
   int wide_flag = 0;
+/* MEB0389 00-06-21: support UTF16 strings in ccQ */
+#ifndef UTF16_CHAR
   int wchar_bytes = TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT;
+#endif
   int nchars;
 
   if (TREE_CHAIN (strings))
@@ -238,6 +241,29 @@
       /* More than one in the chain, so concatenate.  */
       register char *p, *q;
 
+/* MEB0389 00-06-21: support UTF16 strings in ccQ */
+/* handle utf16 string literals 
+   calculate length independent of string type 
+   during adding all string length is counted in characters
+   at the end length is converted to bytes 
+*/
+#ifdef UTF16_CHAR
+      for (t = strings; t; t = TREE_CHAIN (t))
+      {
+        int current_wide_flag = TREE_ARRAY_TYPE_WIDE_FLAG(TREE_TYPE(t));
+        /* add length in chars without terminating 0
+           because of terminating 0 for the whole string 
+           length has been initialized with 1 */
+        length += TREE_STRING_LENGTH (t) / WIDE_BYTES( current_wide_flag ) - 1; 
+        /* determine largest involved string type */
+        if( WIDE_BYTES(current_wide_flag)>WIDE_BYTES(wide_flag) )
+        {
+          wide_flag = current_wide_flag;
+        }
+      }
+      /* convert length from characters to bytes */
+      length = length * WIDE_BYTES(wide_flag);
+#else
       /* Don't include the \0 at the end of each substring,
 	 except for the last one.
 	 Count wide strings and ordinary strings separately.  */
@@ -256,13 +282,64 @@
 	 which makes them take more space.  */
       if (wide_flag)
 	length = length * wchar_bytes + wide_length;
+#endif
 
       p = savealloc (length);
 
       /* Copy the individual strings into the new combined string.
 	 If the combined string is wide, convert the chars to ints
 	 for any individual strings that are not wide.  */
+/* MEB0389 00-06-21: support UTF16 strings in ccQ */
+/* handle utf16 string literals  */
+#ifdef UTF16_CHAR
+
+      q = p;
+      for (t = strings; t; t = TREE_CHAIN (t))
+	{
+	  int current_wide_flag = TREE_ARRAY_TYPE_WIDE_FLAG (TREE_TYPE (t));
+	  /* source character size in bytes */
+	  int current_wide_bytes = WIDE_BYTES (current_wide_flag);
+	  /* source character size in bits */
+	  int current_wide_width = WIDE_WIDTH (current_wide_flag);
+	  /* target character size in bytes */
+	  int wide_bytes = WIDE_BYTES (wide_flag);
+	  /* target character size in bits */
+	  int wide_width = WIDE_WIDTH (wide_flag);
+	  /* string length in bytes without terminating 0 */
+	  int len = TREE_STRING_LENGTH (t) - current_wide_bytes;
+
+	  /* source_type == target_type -> memcpy */
+	  if (current_wide_width == wide_width)
+	    {
+	      memcpy (q, TREE_STRING_POINTER (t), len);
+	      q += len;
+	    }
+	  else
+	    {
+	      /* widen every character of source_type to character of target_type */
+	      int i;
+	      for (i = 0; i < len; i++)
+		{
+		  if (wide_width == HOST_BITS_PER_SHORT)
+		    ((short *) q)[i] = WIDE_FLAG_ARRAY_ACCESS( current_wide_flag, TREE_STRING_POINTER (t), i );
+		  else
+		    ((int *) q)[i] = WIDE_FLAG_ARRAY_ACCESS( current_wide_flag, TREE_STRING_POINTER (t), i );
+		}
+	      /* added number of bytes is source byte len rescaled with target character size / source character size */
+	      q += len * wide_bytes / current_wide_bytes;
+	    }
+	}
 
+      /* add appropriate number of terminating 0 bytes for a 0 char */
+      if (wide_flag)
+	{
+	  int i;
+	  for (i = 0; i < WIDE_BYTES(wide_flag); i++)
+	    *q++ = 0;
+	}
+      else
+	*q = 0;
+#else
       q = p;
       for (t = strings; t; t = TREE_CHAIN (t))
 	{
@@ -295,6 +372,7 @@
 	}
       else
 	*q = 0;
+#endif
 
       value = make_node (STRING_CST);
       TREE_STRING_POINTER (value) = p;
@@ -304,12 +382,24 @@
     {
       value = strings;
       length = TREE_STRING_LENGTH (value);
+/* MEB0389 00-06-21: support UTF16 strings */
+/* handle utf16 string literals */
+#ifdef UTF16_CHAR
+  wide_flag = TREE_ARRAY_TYPE_WIDE_FLAG( TREE_TYPE(value) );
+#else
       if (TREE_TYPE (value) == wchar_array_type_node)
 	wide_flag = 1;
+#endif
     }
 
   /* Compute the number of elements, for the array type.  */
+/* MEB0389 00-06-21: support UTF16 strings */
+/* handle utf16 string literals */
+#ifdef UTF16_CHAR
+  nchars = length / WIDE_BYTES(wide_flag);
+#else
   nchars = wide_flag ? length / wchar_bytes : length;
+#endif
 
   /* Create the array type for the string constant.
      -Wwrite-strings says make the string constant an array of const char
@@ -318,17 +408,33 @@
   if (flag_const_strings
       && (! flag_traditional  && ! flag_writable_strings))
     {
+/* MEB0389 00-06-21: support UTF16 strings */
+/* handle utf16 string literals */
+#ifdef UTF16_CHAR
+      tree elements
+	= build_type_variant (WIDE_FLAG_TYPE(wide_flag),
+			      1, 0);
+#else
       tree elements
 	= build_type_variant (wide_flag ? wchar_type_node : char_type_node,
 			      1, 0);
+#endif
       TREE_TYPE (value)
 	= build_array_type (elements,
 			    build_index_type (build_int_2 (nchars - 1, 0)));
     }
   else
+/* MEB0389 00-06-21: support UTF16 strings */
+/* handle utf16 string literals */
+#ifdef UTF16_CHAR
+    TREE_TYPE (value)
+      = build_array_type (WIDE_FLAG_TYPE(wide_flag),
+			  build_index_type (build_int_2 (nchars - 1, 0)));
+#else
     TREE_TYPE (value)
       = build_array_type (wide_flag ? wchar_type_node : char_type_node,
 			  build_index_type (build_int_2 (nchars - 1, 0)));
+#endif
 
   TREE_CONSTANT (value) = 1;
   TREE_READONLY (value) = ! flag_writable_strings;
diff -urN gcc-2.95.2.orig/gcc/c-decl.c gcc-2.95.2/gcc/c-decl.c
--- gcc-2.95.2.orig/gcc/c-decl.c	Mon Apr 12 16:05:29 1999
+++ gcc-2.95.2/gcc/c-decl.c	Fri Jul 21 09:34:03 2000
@@ -136,6 +136,14 @@
 tree signed_wchar_type_node;
 tree unsigned_wchar_type_node;
 
+/* MEB0389 00-06-21: support UTF16 strings */
+#ifdef UTF16_CHAR
+  tree uchar_type_node;
+  tree signed_uchar_type_node;
+  tree unsigned_uchar_type_node;
+#endif
+
+
 tree float_type_node;
 tree double_type_node;
 tree long_double_type_node;
@@ -188,6 +196,21 @@
 
 tree wchar_array_type_node;
 
+/* MEB0389 00-06-21: support UTF16 strings */
+#ifdef UTF16_CHAR
+  tree uchar_array_type_node;
+#endif
+
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* data structures for working with different wide string types */
+#ifdef UTF16_CHAR
+  tree wide_type_nodes[WIDE_FLAG_LAST];
+  tree wide_array_type_nodes[WIDE_FLAG_LAST];
+  int wide_type_size[WIDE_FLAG_LAST];
+#endif
+
+
 /* type `int ()' -- used for implicit declaration of functions.  */
 
 tree default_function_type;
@@ -3025,6 +3048,12 @@
   tree memcpy_ftype, memset_ftype, strlen_ftype;
   tree void_ftype_any, ptr_ftype_void, ptr_ftype_ptr;
   int wchar_type_size;
+
+/* MEB0389 00-06-21: support UTF16 strings */
+#ifdef UTF16_CHAR
+  int uchar_type_size;
+#endif
+
   tree temp;
   tree array_domain_type;
 
@@ -3236,6 +3265,35 @@
   /* This is for wide string constants.  */
   wchar_array_type_node
     = build_array_type (wchar_type_node, array_domain_type);
+
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* create utf16 type nodes */
+#ifdef UTF16_CHAR
+  uchar_type_node = short_unsigned_type_node;
+  unsigned_uchar_type_node = short_unsigned_type_node;
+  signed_uchar_type_node = short_integer_type_node;
+
+  /* This is for wide string constants.  */
+  uchar_array_type_node
+    = build_array_type (uchar_type_node, array_domain_type);
+#endif
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* init character type arrays */
+#ifdef UTF16_CHAR
+  wide_type_nodes[WIDE_FLAG_CHAR]  = char_type_node;
+  wide_type_nodes[WIDE_FLAG_WCHAR] = wchar_type_node;
+  wide_type_nodes[WIDE_FLAG_UCHAR] = uchar_type_node;
+
+  wide_array_type_nodes[WIDE_FLAG_CHAR]  = char_array_type_node;
+  wide_array_type_nodes[WIDE_FLAG_WCHAR] = wchar_array_type_node;
+  wide_array_type_nodes[WIDE_FLAG_UCHAR] = uchar_array_type_node;
+
+  wide_type_size[WIDE_FLAG_CHAR]  = CHAR_TYPE_SIZE;
+  wide_type_size[WIDE_FLAG_WCHAR] = WCHAR_TYPE_SIZE;
+  wide_type_size[WIDE_FLAG_UCHAR] = 16;
+#endif
 
   default_function_type
     = build_function_type (integer_type_node, NULL_TREE);
diff -urN gcc-2.95.2.orig/gcc/c-lex.c gcc-2.95.2/gcc/c-lex.c
--- gcc-2.95.2.orig/gcc/c-lex.c	Sat Mar 20 20:21:23 1999
+++ gcc-2.95.2/gcc/c-lex.c	Fri Jul 21 09:34:03 2000
@@ -1258,18 +1258,36 @@
       value = ENDFILE;
       break;
 
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* accept 'u' as character/string constant prefix */
+#ifdef UTF16_CHAR
+    case 'u':
+#endif
     case 'L':
       /* Capital L may start a wide-string or wide-character constant.  */
       {
+#ifdef UTF16_CHAR
+	register int old_c = c;
+#endif
 	register int c = GETC();
+
 	if (c == '\'')
 	  {
+#ifdef UTF16_CHAR
+	    wide_flag = LITERAL_WIDE_FLAG(old_c);
+#else
 	    wide_flag = 1;
+#endif
 	    goto char_constant;
 	  }
 	if (c == '"')
 	  {
+#ifdef UTF16_CHAR
+	    wide_flag = LITERAL_WIDE_FLAG(old_c);
+#else
 	    wide_flag = 1;
+#endif
 	    goto string_constant;
 	  }
 	UNGETC (c);
@@ -1305,7 +1323,13 @@
     case 'f':  case 'g':  case 'h':  case 'i':  case 'j':
     case 'k':  case 'l':  case 'm':  case 'n':  case 'o':
     case 'p':  case 'q':  case 'r':  case 's':  case 't':
+/* MEB0389 00-06-21: support UTF16 strings */
+/* accept 'u' as character/string constant prefix */
+#ifdef UTF16_CHAR
+               case 'v':  case 'w':  case 'x':  case 'y':
+#else
     case 'u':  case 'v':  case 'w':  case 'x':  case 'y':
+#endif
     case 'z':
     case '_':
     case '$':
@@ -1894,8 +1918,17 @@
 #endif
 
 	max_chars = TYPE_PRECISION (integer_type_node) / width;
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* determine size of characters */
+#ifdef UTF16_CHAR
+	if (wide_flag)
+	  width = WIDE_WIDTH(wide_flag);
+#else
 	if (wide_flag)
 	  width = WCHAR_TYPE_SIZE;
+#endif
 
 	while (1)
 	  {
@@ -2040,7 +2073,14 @@
 	else
 	  {
 	    yylval.ttype = build_int_2 (result, 0);
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* assign appropriate type */
+#ifdef UTF16_CHAR
+	    TREE_TYPE (yylval.ttype) = WIDE_FLAG_TYPE(wide_flag);
+#else
 	    TREE_TYPE (yylval.ttype) = wchar_type_node;
+#endif
 	  }
 
 	value = CONSTANT;
@@ -2050,8 +2090,16 @@
     case '"':
     string_constant:
       {
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* determine size of characters */
+#ifdef UTF16_CHAR
+	unsigned width = WIDE_WIDTH( wide_flag );
+#else
 	unsigned width = wide_flag ? WCHAR_TYPE_SIZE
 	                           : TYPE_PRECISION (char_type_node);
+#endif
+
 #ifdef MULTIBYTE_CHARS
 	int longest_char = local_mb_cur_max ();
 	(void) local_mbtowc (NULL_PTR, NULL_PTR, 0);
@@ -2112,6 +2160,40 @@
 #endif /* MULTIBYTE_CHARS */
 	      }
 
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* copy every character from token_buffer into string node
+   if necessary widen from char to target character
+   consider endians
+*/
+#ifdef UTF16_CHAR
+	    /* Add this single character into the buffer either as a wchar_t
+	       or as a single byte.  */
+	    if (wide_flag)
+	      {
+		unsigned width = TYPE_PRECISION (char_type_node);
+		unsigned bytemask = (1 << width) - 1;
+		int byte;
+
+		if (p + WIDE_BYTES(wide_flag) > token_buffer + maxtoken)
+		  p = extend_token_buffer (p);
+
+		for (byte = 0; byte < WIDE_BYTES(wide_flag); ++byte)
+		  {
+		    int value;
+		    if (byte >= (int) sizeof(c))
+		      value = 0;
+		    else
+		      value = (c >> (byte * width)) & bytemask;
+		    if (BYTES_BIG_ENDIAN)
+		      p[WIDE_BYTES(wide_flag) - byte - 1] = value;
+		    else
+		      p[byte] = value;
+		  }
+		p += WIDE_BYTES(wide_flag);
+	      }
+#else
+
 	    /* Add this single character into the buffer either as a wchar_t
 	       or as a single byte.  */
 	    if (wide_flag)
@@ -2137,6 +2219,7 @@
 		  }
 		p += WCHAR_BYTES;
 	      }
+#endif
 	    else
 	      {
 		if (p >= token_buffer + maxtoken)
@@ -2152,10 +2235,20 @@
 	   or with a wide zero.  */
 	if (wide_flag)
 	  {
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* terminate string with appropriate number of 0 bytes */
+#ifdef UTF16_CHAR
+	    if (p + WIDE_BYTES(wide_flag) > token_buffer + maxtoken)
+	      p = extend_token_buffer (p);
+	    bzero (p, WIDE_BYTES(wide_flag));
+	    p += WIDE_BYTES(wide_flag);
+#else
 	    if (p + WCHAR_BYTES > token_buffer + maxtoken)
 	      p = extend_token_buffer (p);
 	    bzero (p, WCHAR_BYTES);
 	    p += WCHAR_BYTES;
+#endif
 	  }
 	else
 	  {
@@ -2174,7 +2267,16 @@
 	  {
 	    yylval.ttype = build_string (p - (token_buffer + 1),
 					 token_buffer + 1);
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* assign appropriate type */
+#ifdef UTF16_CHAR
+	    TREE_TYPE (yylval.ttype) = WIDE_FLAG_ARRAY_TYPE(wide_flag);
+#else
 	    TREE_TYPE (yylval.ttype) = wchar_array_type_node;
+#endif
+
 	    value = STRING;
 	  }
 	else if (objc_flag)
diff -urN gcc-2.95.2.orig/gcc/c-tree.h gcc-2.95.2/gcc/c-tree.h
--- gcc-2.95.2.orig/gcc/c-tree.h	Thu Feb 18 21:38:43 1999
+++ gcc-2.95.2/gcc/c-tree.h	Fri Jul 21 09:34:03 2000
@@ -276,6 +276,66 @@
 extern tree void_type_node;
 extern tree wchar_array_type_node;
 extern tree wchar_type_node;
+
+/* TODO */
+#define UTF16_CHAR 1
+
+/* MEB0389 00-06-21: support UTF16 strings */
+#ifdef UTF16_CHAR
+  extern tree uchar_array_type_node;
+  extern tree uchar_type_node, signed_uchar_type_node, unsigned_uchar_type_node;
+#endif
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* data structures and helper macros for working with different wide string types */
+#ifdef UTF16_CHAR
+  /* enum to distinguish between char, wchar and uchar */
+  enum wide_flag_type
+  {
+    WIDE_FLAG_CHAR = 0,
+    WIDE_FLAG_WCHAR,
+    WIDE_FLAG_UCHAR,
+    WIDE_FLAG_LAST
+  };
+  /* type nodes for character types */
+  extern tree wide_type_nodes[WIDE_FLAG_LAST];
+  extern tree wide_array_type_nodes[WIDE_FLAG_LAST];
+  #define WIDE_FLAG_TYPE(WIDE_FLAG) (wide_type_nodes[(WIDE_FLAG)])
+  #define WIDE_FLAG_ARRAY_TYPE(WIDE_FLAG) (wide_array_type_nodes[(WIDE_FLAG)])
+
+  /* type node size for character types */
+  extern int wide_type_size[WIDE_FLAG_LAST];
+  #define WIDE_WIDTH(WIDE_FLAG) (wide_type_size[(WIDE_FLAG)])
+  #define WIDE_BYTES(WIDE_FLAG) (wide_type_size[(WIDE_FLAG)]/BITS_PER_UNIT)
+
+  /* determine if string is char, wchar or uchar */
+  #define TREE_TYPE_WIDE_FLAG(NODE) \
+     ((NODE)==wchar_type_node ?     \
+       WIDE_FLAG_WCHAR :            \
+       (NODE)==uchar_type_node ?    \
+         WIDE_FLAG_UCHAR :          \
+         WIDE_FLAG_CHAR)                   
+  #define TREE_ARRAY_TYPE_WIDE_FLAG(NODE) \
+     ((NODE)==wchar_array_type_node ?     \
+       WIDE_FLAG_WCHAR :                  \
+       (NODE)==uchar_array_type_node ?    \
+         WIDE_FLAG_UCHAR :                \
+         WIDE_FLAG_CHAR)
+
+  /* determine if wchar or uchar from string literal prefix ('L' or 'U') */
+  #define LITERAL_WIDE_FLAG(PREFIX) ((PREFIX)=='L' ? WIDE_FLAG_WCHAR : WIDE_FLAG_UCHAR)
+
+  /* access wide string array with correct type size */
+  #define WIDE_FLAG_ARRAY_ACCESS(WIDE_FLAG,ARRAY,INDEX) \
+    (WIDE_WIDTH(WIDE_FLAG)==BITS_PER_UNIT ?             \
+      ((char*)(ARRAY))[(INDEX)] :                       \
+      WIDE_WIDTH(WIDE_FLAG)==HOST_BITS_PER_SHORT ?      \
+        ((short*)(ARRAY))[(INDEX)] :                    \
+        ((int*)(ARRAY))[(INDEX)])
+
+#endif
+
+
 extern tree boolean_type_node;
 extern tree boolean_true_node;
 extern tree boolean_false_node;
diff -urN gcc-2.95.2.orig/gcc/c-typeck.c gcc-2.95.2/gcc/c-typeck.c
--- gcc-2.95.2.orig/gcc/c-typeck.c	Thu Sep 16 06:17:51 1999
+++ gcc-2.95.2/gcc/c-typeck.c	Fri Jul 21 09:34:03 2000
@@ -4776,7 +4776,13 @@
 	   || typ1 == signed_char_type_node
 	   || typ1 == unsigned_char_type_node
 	   || typ1 == unsigned_wchar_type_node
-	   || typ1 == signed_wchar_type_node)
+	   || typ1 == signed_wchar_type_node
+/* MEB0389 00-06-21: support UTF16 strings */
+#ifdef UTF16_CHAR
+	   || typ1 == unsigned_uchar_type_node
+	   || typ1 == signed_uchar_type_node
+#endif
+	   )
 	  && ((inside_init && TREE_CODE (inside_init) == STRING_CST)))
 	{
 	  if (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
@@ -4807,10 +4813,18 @@
 	      /* Subtract 1 (or sizeof (wchar_t))
 		 because it's ok to ignore the terminating null char
 		 that is counted in the length of the constant.  */
+/* MEB: subtract apropriate number of bytes for uchar */
+#ifdef UTF16_CHAR
+	      if (size < TREE_STRING_LENGTH (inside_init)
+		  - (TYPE_PRECISION (typ1) != TYPE_PRECISION (char_type_node)
+		     ? TYPE_PRECISION (typ1) / BITS_PER_UNIT
+		     : 1))
+#else
 	      if (size < TREE_STRING_LENGTH (inside_init)
 		  - (TYPE_PRECISION (typ1) != TYPE_PRECISION (char_type_node)
 		     ? TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT
 		     : 1))
+#endif
 		pedwarn_init ("initializer-string for array of chars is too long");
 	    }
 	  return inside_init;
diff -urN gcc-2.95.2.orig/gcc/cexp.y gcc-2.95.2/gcc/cexp.y
--- gcc-2.95.2.orig/gcc/cexp.y	Tue Mar 16 22:10:34 1999
+++ gcc-2.95.2/gcc/cexp.y	Fri Jul 21 09:34:19 2000
@@ -550,6 +550,14 @@
     lexptr++;
     goto retry;
     
+    /* MEB0432 00-07-20: support UTF16_CHAR also in preprocessor 
+       accept 'u' for string and char constants like 'L'  
+       note: a adaption of mask and width for 'u' is not required 
+    */ 
+#define UTF16_CHAR 1
+#ifdef UTF16_CHAR 
+  case 'u': 
+#endif
   case 'L':
     /* Capital L may start a wide-string or wide-character constant.  */
     if (lexptr[1] == '\'')
diff -urN gcc-2.95.2.orig/gcc/cp/cp-tree.h gcc-2.95.2/gcc/cp/cp-tree.h
--- gcc-2.95.2.orig/gcc/cp/cp-tree.h	Fri Aug 20 01:29:44 1999
+++ gcc-2.95.2/gcc/cp/cp-tree.h	Fri Jul 21 09:34:03 2000
@@ -341,6 +341,65 @@
 extern tree wchar_array_type_node;
 extern tree wchar_type_node, signed_wchar_type_node, unsigned_wchar_type_node;
 
+/* TODO */
+#define UTF16_CHAR 1
+
+/* MEB0389 00-06-21: support UTF16 strings */
+#ifdef UTF16_CHAR
+  extern tree uchar_array_type_node;
+  extern tree uchar_type_node, signed_uchar_type_node, unsigned_uchar_type_node;
+#endif
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* data structures and helper macros for working with different wide string types */
+#ifdef UTF16_CHAR
+  /* enum to distinguish between char, wchar and uchar */
+  enum wide_flag_type
+  {
+    WIDE_FLAG_CHAR = 0,
+    WIDE_FLAG_WCHAR,
+    WIDE_FLAG_UCHAR,
+    WIDE_FLAG_LAST
+  };
+  /* type nodes for character types */
+  extern tree wide_type_nodes[WIDE_FLAG_LAST];
+  extern tree wide_array_type_nodes[WIDE_FLAG_LAST];
+  #define WIDE_FLAG_TYPE(WIDE_FLAG) (wide_type_nodes[(WIDE_FLAG)])
+  #define WIDE_FLAG_ARRAY_TYPE(WIDE_FLAG) (wide_array_type_nodes[(WIDE_FLAG)])
+
+  /* type node size for character types */
+  extern int wide_type_size[WIDE_FLAG_LAST];
+  #define WIDE_WIDTH(WIDE_FLAG) (wide_type_size[(WIDE_FLAG)])
+  #define WIDE_BYTES(WIDE_FLAG) (wide_type_size[(WIDE_FLAG)]/BITS_PER_UNIT)
+
+  /* determine if string is char, wchar or uchar */
+  #define TREE_TYPE_WIDE_FLAG(NODE) \
+     ((NODE)==wchar_type_node ?     \
+       WIDE_FLAG_WCHAR :            \
+       (NODE)==uchar_type_node ?    \
+         WIDE_FLAG_UCHAR :          \
+         WIDE_FLAG_CHAR)                   
+  #define TREE_ARRAY_TYPE_WIDE_FLAG(NODE) \
+     ((NODE)==wchar_array_type_node ?     \
+       WIDE_FLAG_WCHAR :                  \
+       (NODE)==uchar_array_type_node ?    \
+         WIDE_FLAG_UCHAR :                \
+         WIDE_FLAG_CHAR)
+
+  /* determine if wchar or uchar from string literal prefix ('L' or 'U') */
+  #define LITERAL_WIDE_FLAG(PREFIX) ((PREFIX)=='L' ? WIDE_FLAG_WCHAR : WIDE_FLAG_UCHAR)
+
+  /* access wide string array with correct type size */
+  #define WIDE_FLAG_ARRAY_ACCESS(WIDE_FLAG,ARRAY,INDEX) \
+    (WIDE_WIDTH(WIDE_FLAG)==BITS_PER_UNIT ?             \
+      ((char*)(ARRAY))[(INDEX)] :                       \
+      WIDE_WIDTH(WIDE_FLAG)==HOST_BITS_PER_SHORT ?      \
+        ((short*)(ARRAY))[(INDEX)] :                    \
+        ((int*)(ARRAY))[(INDEX)])
+
+#endif
+
+
 extern tree complex_integer_type_node;
 extern tree complex_float_type_node;
 extern tree complex_double_type_node;
diff -urN gcc-2.95.2.orig/gcc/cp/decl.c gcc-2.95.2/gcc/cp/decl.c
--- gcc-2.95.2.orig/gcc/cp/decl.c	Mon Aug  9 02:28:33 1999
+++ gcc-2.95.2/gcc/cp/decl.c	Fri Jul 21 09:34:03 2000
@@ -231,6 +231,15 @@
 
 tree wchar_decl_node;
 
+/* MEB0389 00-06-21: support UTF16 strings */
+/* data structures for working with different wide string types */
+#ifdef UTF16_CHAR
+  tree uchar_type_node;
+  tree signed_uchar_type_node;
+  tree unsigned_uchar_type_node;
+#endif
+
+
 tree float_type_node;
 tree double_type_node;
 tree long_double_type_node;
@@ -294,6 +303,20 @@
 
 tree wchar_array_type_node;
 
+/* MEB0389 00-06-21: support UTF16 strings */
+#ifdef UTF16_CHAR
+  tree uchar_array_type_node;
+#endif
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* data structures for working with different wide string types */
+#ifdef UTF16_CHAR
+  tree wide_type_nodes[WIDE_FLAG_LAST];
+  tree wide_array_type_nodes[WIDE_FLAG_LAST];
+  int wide_type_size[WIDE_FLAG_LAST];
+#endif
+
+
 /* The bool data type, and constants */
 tree boolean_type_node, boolean_true_node, boolean_false_node;
 
@@ -6205,6 +6228,12 @@
   /* Data type of memcpy.  */
   tree memcpy_ftype, strlen_ftype;
   int wchar_type_size;
+
+/* MEB0389 00-06-21: support UTF16 strings */
+#ifdef UTF16_CHAR
+  int uchar_type_size;
+#endif
+
   tree temp;
   tree array_domain_type;
   tree vb_off_identifier = NULL_TREE;
@@ -6803,6 +6832,44 @@
   /* This is for wide string constants.  */
   wchar_array_type_node
     = build_array_type (wchar_type_node, array_domain_type);
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* create utf16 type nodes */
+#ifdef UTF16_CHAR
+  uchar_type_node = short_unsigned_type_node;
+  unsigned_uchar_type_node = short_unsigned_type_node;
+  signed_uchar_type_node = short_integer_type_node;
+
+#if 0
+  record_builtin_type (RID_UCHAR, "utf16_t", uchar_type_node);
+
+  /* Artificial declaration of wchar_t -- can be bashed */
+  uchar_decl_node = build_decl (TYPE_DECL, get_identifier ("utf16_t"),
+                                  uchar_type_node);
+  pushdecl (uchar_decl_node);
+#endif
+
+  /* This is for wide string constants.  */
+  uchar_array_type_node
+    = build_array_type (uchar_type_node, array_domain_type);
+#endif
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* init character type arrays */
+#ifdef UTF16_CHAR
+  wide_type_nodes[WIDE_FLAG_CHAR]  = char_type_node;
+  wide_type_nodes[WIDE_FLAG_WCHAR] = wchar_type_node;
+  wide_type_nodes[WIDE_FLAG_UCHAR] = uchar_type_node;
+
+  wide_array_type_nodes[WIDE_FLAG_CHAR]  = char_array_type_node;
+  wide_array_type_nodes[WIDE_FLAG_WCHAR] = wchar_array_type_node;
+  wide_array_type_nodes[WIDE_FLAG_UCHAR] = uchar_array_type_node;
+
+  wide_type_size[WIDE_FLAG_CHAR]  = CHAR_TYPE_SIZE;
+  wide_type_size[WIDE_FLAG_WCHAR] = WCHAR_TYPE_SIZE;
+  wide_type_size[WIDE_FLAG_UCHAR] = 16;
+#endif
+
 
   if (flag_vtable_thunks)
     {
diff -urN gcc-2.95.2.orig/gcc/cp/lex.c gcc-2.95.2/gcc/cp/lex.c
--- gcc-2.95.2.orig/gcc/cp/lex.c	Wed Aug 11 20:36:44 1999
+++ gcc-2.95.2/gcc/cp/lex.c	Fri Jul 21 09:34:03 2000
@@ -3298,21 +3298,41 @@
       dollar_seen = 1;
       goto letter;
 
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* accept 'u' as character/string constant prefix */
+#ifdef UTF16_CHAR
+    case 'u':
+#endif
     case 'L':
       /* Capital L may start a wide-string or wide-character constant.  */
       {
+#ifdef UTF16_CHAR
+	register int old_c = c;
+#endif
 	register int c = getch ();
 	if (c == '\'')
 	  {
+#ifdef UTF16_CHAR
+	    wide_flag = LITERAL_WIDE_FLAG(old_c);
+#else
 	    wide_flag = 1;
+#endif
 	    goto char_constant;
 	  }
 	if (c == '"')
 	  {
+#ifdef UTF16_CHAR
+	    wide_flag = LITERAL_WIDE_FLAG(old_c);
+#else
 	    wide_flag = 1;
+#endif
 	    goto string_constant;
 	  }
 	put_back (c);
+#ifdef UTF16_CHAR
+  wide_flag = 0;
+#endif
       }
 
     case 'A':  case 'B':  case 'C':  case 'D':  case 'E':
@@ -3325,7 +3345,13 @@
     case 'f':  case 'g':  case 'h':  case 'i':  case 'j':
     case 'k':  case 'l':  case 'm':  case 'n':  case 'o':
     case 'p':  case 'q':  case 'r':  case 's':  case 't':
+/* MEB0389 00-06-21: support UTF16 strings */
+/* accept 'u' as character/string constant prefix */
+#ifdef UTF16_CHAR
+               case 'v':  case 'w':  case 'x':  case 'y':
+#else
     case 'u':  case 'v':  case 'w':  case 'x':  case 'y':
+#endif
     case 'z':
     case '_':
     letter:
@@ -3998,8 +4024,17 @@
 #endif
 
 	max_chars = TYPE_PRECISION (integer_type_node) / width;
+
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* determine size of characters */
+#ifdef UTF16_CHAR
+	if (wide_flag)
+	  width = WIDE_WIDTH(wide_flag);
+#else
 	if (wide_flag)
 	  width = WCHAR_TYPE_SIZE;
+#endif
 
 	while (1)
 	  {
@@ -4147,7 +4182,14 @@
 	else
 	  {
 	    yylval.ttype = build_int_2 (result, 0);
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* assign appropriate type */
+#ifdef UTF16_CHAR
+	    TREE_TYPE (yylval.ttype) = WIDE_FLAG_TYPE(wide_flag);
+#else
 	    TREE_TYPE (yylval.ttype) = wchar_type_node;
+#endif
 	  }
 
 	value = CONSTANT;
@@ -4158,8 +4200,16 @@
     string_constant:
       {
 	register char *p;
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* determine size of characters */
+#ifdef UTF16_CHAR
+  unsigned width = WIDE_WIDTH( wide_flag );
+#else
 	unsigned width = wide_flag ? WCHAR_TYPE_SIZE
 	                           : TYPE_PRECISION (char_type_node);
+#endif
+
 #ifdef MULTIBYTE_CHARS
 	int longest_char = local_mb_cur_max ();
 	(void) local_mbtowc (NULL_PTR, NULL_PTR, 0);
@@ -4222,6 +4272,39 @@
 #endif /* MULTIBYTE_CHARS */
 	      }
 
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* copy every character from token_buffer into string node
+   if necessary widen from char to target character
+   consider endians
+*/
+#ifdef UTF16_CHAR
+	    /* Add this single character into the buffer either as a wchar_t
+	       or as a single byte.  */
+	    if (wide_flag)
+	      {
+		unsigned width = TYPE_PRECISION (char_type_node);
+		unsigned bytemask = (1 << width) - 1;
+		int byte;
+
+		if (p + WIDE_BYTES(wide_flag) > token_buffer + maxtoken)
+		  p = extend_token_buffer (p);
+
+		for (byte = 0; byte < WIDE_BYTES(wide_flag); ++byte)
+		  {
+		    int value;
+		    if (byte >= (int) sizeof(c))
+		      value = 0;
+		    else
+		      value = (c >> (byte * width)) & bytemask;
+		    if (BYTES_BIG_ENDIAN)
+		      p[WIDE_BYTES(wide_flag) - byte - 1] = value;
+		    else
+		      p[byte] = value;
+		  }
+		p += WIDE_BYTES(wide_flag);
+	      }
+#else
 	    /* Add this single character into the buffer either as a wchar_t
 	       or as a single byte.  */
 	    if (wide_flag)
@@ -4247,6 +4330,7 @@
 		  }
 		p += WCHAR_BYTES;
 	      }
+#endif
 	    else
 	      {
 		if (p >= token_buffer + maxtoken)
@@ -4266,10 +4350,20 @@
 	   or with a wide zero.  */
 	if (wide_flag)
 	  {
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* terminate string with appropriate number of 0 bytes */
+#ifdef UTF16_CHAR
+	    if (p + WIDE_BYTES(wide_flag) > token_buffer + maxtoken)
+	      p = extend_token_buffer (p);
+	    bzero (p, WIDE_BYTES(wide_flag));
+	    p += WIDE_BYTES(wide_flag);
+#else
 	    if (p + WCHAR_BYTES > token_buffer + maxtoken)
 	      p = extend_token_buffer (p);
 	    bzero (p, WCHAR_BYTES);
 	    p += WCHAR_BYTES;
+#endif
 	  }
 	else
 	  {
@@ -4287,10 +4381,17 @@
 	if (processing_template_decl)
 	  pop_obstacks ();
 
+/* MEB0389 00-06-21: support UTF16 strings */
+/* scan utf16 string literals */
+/* assign appropriate type */
+#ifdef UTF16_CHAR
+	TREE_TYPE (yylval.ttype) = WIDE_FLAG_ARRAY_TYPE(wide_flag);
+#else
 	if (wide_flag)
 	  TREE_TYPE (yylval.ttype) = wchar_array_type_node;
 	else
 	  TREE_TYPE (yylval.ttype) = char_array_type_node;
+#endif
 
 	value = STRING; break;
       }
diff -urN gcc-2.95.2.orig/gcc/cp/typeck.c gcc-2.95.2/gcc/cp/typeck.c
--- gcc-2.95.2.orig/gcc/cp/typeck.c	Mon Aug  9 10:46:20 1999
+++ gcc-2.95.2/gcc/cp/typeck.c	Fri Jul 21 09:34:03 2000
@@ -1878,7 +1878,12 @@
 
   t = TREE_TYPE (totype);
   if (!same_type_p (t, char_type_node)
-      && !same_type_p (t, wchar_type_node))
+      && !same_type_p (t, wchar_type_node)
+/* MEB0389 00-06-21: support UTF16 strings */
+#ifdef UTF16_CHAR
+      && !same_type_p (t, uchar_type_node)
+#endif
+      )
     return 0;
 
   if (TREE_CODE (exp) == STRING_CST)
diff -urN gcc-2.95.2.orig/gcc/cp/typeck2.c gcc-2.95.2/gcc/cp/typeck2.c
--- gcc-2.95.2.orig/gcc/cp/typeck2.c	Mon Aug  9 08:47:02 1999
+++ gcc-2.95.2/gcc/cp/typeck2.c	Fri Jul 21 09:34:03 2000
@@ -756,7 +756,13 @@
 	   || typ1 == signed_char_type_node
 	   || typ1 == unsigned_char_type_node
 	   || typ1 == unsigned_wchar_type_node
-	   || typ1 == signed_wchar_type_node)
+	   || typ1 == signed_wchar_type_node
+/* MEB0389 00-06-21: support UTF16 strings */
+#ifdef UTF16_CHAR
+	   || typ1 == unsigned_uchar_type_node
+	   || typ1 == signed_uchar_type_node
+#endif
+	   )
 	  && ((init && TREE_CODE (init) == STRING_CST)
 	      || (element && TREE_CODE (element) == STRING_CST)))
 	{
diff -urN gcc-2.95.2.orig/gcc/version.c gcc-2.95.2/gcc/version.c
--- gcc-2.95.2.orig/gcc/version.c	Mon Oct 25 08:49:39 1999
+++ gcc-2.95.2/gcc/version.c	Fri Jul 21 09:36:08 2000
@@ -1 +1 @@
-char *version_string = "2.95.2 19991024 (release)";
+char *version_string = "2.95.2 19991024 (release) (SAP5 modification: UTF16 )";
