5
votes
Vote UpVote

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 ...
Favorite? Off-Topic? Chris Rolliston @ 2011-09-26 01:53

Statistics

Visits: 935
Votes: 5
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Lars Fosdal
Rodrigo
TObject
TOndrej
vcldeveloper
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)