bugGNUstep - Bugs: bug #4624, NSString does not handle...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #4624: NSString does not handle codepoints greater than 65535

Submitted by:  Pete French <minusbat>
Submitted on:  Mon 04 Aug 2003 09:03:59 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 17 Oct 2003 06:14:03 AM UTC, comment #1:

Fixed in CVS ... thanks

Richard Frith-Macdonald <CaS>
Project Member
Mon 04 Aug 2003 09:03:59 PM UTC, original submission:

Under OSX an NSString handles codepoints greater than 16 bits
by converting them into paired surrogates - i.e. the unichars
stored in the string appear to be UTF-16. This does not work
under GNUstep.

Example - initialise a string with the UTF8 hex bytes of
0xc2, 0xa3, 0xf0, 0x90, 0x80, 0x81, 0xc2, 0xa3, 0x00
which is the encoding for three characters - 0xa3, 0x10001, 0xa3

Doing this under OSX yields a string of length '4'. Printing the 4
unichars in the string gives: 0xa3, 0xd800, 0xdc01, 0xa3 which is
the correct UTF-16 format for the string.

Under GNUstep the method stringWithUTF8String: return nil
when presented with the same daata. Taking out the over 16 bit
enccoding sequence results in the correct unichars.

Pete French <minusbat>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 17 Oct 2003 06:14:03 AM UTCCaSStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1