Re: [Pyobjc-dev] strings returned from ObjC are now unicode?
Brought to you by:
ronaldoussoren
From: Chris R. <cp...@em...> - 2003-02-09 20:35:09
|
On Sunday, February 9, 2003, at 06:40 AM, Ronald Oussoren wrote: > On Sunday, Feb 9, 2003, at 09:23 Europe/Amsterdam, Just van Rossum > wrote: > >> Chris Ryland wrote: >> >>> The latest CVS seems to return unicode strings from objc >>> string-producing calls. >>> >>> Is that the final decision about this hotly-debated topic? > Converting NSStrings to unicode was only a sidetrack of the string > related discussions ;-). >> >> I'm not sure it's final, but is it a problem for you? NSStrings can >> always contain unicode so I think it's a good signal to the user (of >> PyObjC ;-) to always return unicode strings. > > This is partially because I was lazy and only subclassed > __builtin__.unicode, but mostly because NSStrings are unicode strings. > Unless returning unicode strings proves to be a real problem I'd like > to keep it this way (if you want a string you can always do the > conversion yourself). I'm afraid I'm not experienced enough with Python to know whether this would be a problem in the long term, but it shouldn't, in theory (let's hope Python's Unicode support is robust enough ;-), and it's the right reflection of the NSString reality, as you say. Cheers! --Chris Ryland / Em Software, Inc. / www.emsoftware.com |