[prev in list] [next in list] [prev in thread] [next in thread] 

List:       icu-bugrfe
Subject:    [icu-bug] incoming/2358
From:       jtcsv () jtcsv ! com
Date:       2002-10-22 0:12:42
[Download RAW message or body]

schererm moved PR#2358 from incoming to returned	URL: http://www.jtcsv.com/cgi-bin/icu-bugs?findid=2358
	Notes: wrong use of invariant conversion for non-invariant characters


====> ORIGINAL MESSAGE FOLLOWS <====

From: Joerg.Linnenkohl@caatoosee.com
Date: Wed Oct  9 10:11:34 2002
Subject: UnicodeString constructor on Solaris

Full_Name: Jörg Linnenkohl
Version: 2.2
OS: all
PROJECT: ICU4C
JAVA:   
Submission from: (NULL) (217.146.130.98)


Hi all,

I guess I found a bug concerning the UnicodeString-constructor on Solaris
(SunOS sparc 5.7 Generic_106541-08 sun4u sparc SUNW,Ultra-60).
I found that the behaviour of the UnicodeString-Constructor and the
UNICODE_STRING macro is different.

Here is a short example, which I tried on this Solaris machine, on a Linux box
and on a W2K pc :

  setlocale( LC_CTYPE, "de.UTF-8" );
  UnicodeString _str1 = UnicodeString( "GÖTTINGEN", strlen("GÖTTINGEN") );
  UnicodeString _str2 = UNICODE_STRING( "GÖTTINGEN", strlen("GÖTTINGEN") );
  StringCharacterIterator* ti;

  ti = new StringCharacterIterator(_str1);
  cout << "STR1:";
  for ( ti->setToStart(); ti->hasNext(); ti->next32PostInc() ) {
    cout << " " << ti->current();
  } 
  cout << endl;
  delete ti;

  ti = new StringCharacterIterator(_str2);
  cout << "STR2:";
  for ( ti->setToStart(); ti->hasNext(); ti->next32PostInc() ) {
    cout << " " << ti->current();
  }
  cout << endl;
  delete ti;

On Linux and W2K I get the expected Results :

STR1: 71 214 84 84 73 78 71 69 78
STR2: 71 214 84 84 73 78 71 69 78

but on Solaris the ouput is :

STR1: 71 65533 84 84 73 78 71 69 78
STR2: 71 214 84 84 73 78 71 69 78

You see the difference for the german umlaut "Ö" ?
Do I made a mistake, or is it a bug ?

Best regards
_______________________________________________
icu-bugrfe mailing list
icu-bugrfe@oss.software.ibm.com
http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu-bugrfe
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic