5
votes
Converting from a Cocoa string to a Delphi string
Delphi Haven
– Reading Malcolm Groves’ useful little post about retrieving special directories in OS X, I noticed he converted from Cocoa to Delphi strings by calling the former’s UTF8String function. Given Cocoa strings are already UTF-16 encoded just like Delphi strings,* this would cause a conversion roundtrip (UTF-16 -> UTF-8 -> UTF-16). What we really want is a simple data copy – but how? To give a bit of background, Cocoa is OS X’s object-oriented API, written in – and designed for – Objective-C, a funky-for-the-uninitiated OOP superset of C. For interfacing ...
Statistics
|
Visits by Source |
User Actions |



