bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #30172] Converting strings lossy results to different strings than


From: Richard Frith-Macdonald
Subject: [bug #30172] Converting strings lossy results to different strings than on OS X
Date: Fri, 18 Jun 2010 09:55:37 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16

Update of bug #30172 (project gnustep):

              Item Group:                     Bug => Change Request         

    _______________________________________________________

Follow-up Comment #4:

I think the last comment rather misses the point ... the documentation on the
apple site referred to does *not* specify the algorithm used for the
conversion, or exactly what the results should be, just an example of one
possible conversion. IIRC the existing GNUstep code does some mapping between
charactersets, and where no specific mappings are set up uses a question mark
or asterisk or somesuch.

If you can provide the mappings to use to exactly match OSX behavior, it
ought to be possible to easily code things ... I'd be very happy to see a
patch to implement them.

You say you aren't using any C strings ... but the method you pointed me to
(-dataUsingEncoding:allowLossyConversion:) converts an NSString to a C string
held inside an NSData object.  Probably you are just using the term slightly
differently ... I make a distinction between C strings and NSStrings, and I
don't think you can meaningfully talk about the encoding of characters in an
NSString (since NSString is an opaque class cluster) so any conversation about
characters in a specific encoding refers to a C string rather than an
NSString.  Of course, avoiding confusion gets really tricky if you are talking
about the internals of specific subclasses inside the class cluster ... let's
not got there.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30172>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]