What encoding do strings in IOBluetoothSDPDataElement structures use?
site_archiver@lists.apple.com Delivered-To: bluetooth-dev@lists.apple.com Thread-index: Acdv9xQ1Ur+oONvqEduPCwARJHK4jA== Thread-topic: What encoding do strings in IOBluetoothSDPDataElement structures use? User-agent: Microsoft-Entourage/11.3.3.061214 I wonder if it was smart to store byte sequences of SDP records as NSStrings only because the SDP specification calls them "strings". The problem at hand is that I need to store non-textual strings in the SDP records but apparently can't: Apple's Bluetooth libs require me to pass the data in NSString containers, but those are for text, and need a encoding, which is basically nonsense, it appears to me. I am trying to store a sequence of bytes into an NSString, but when I try to store it as a UTF8 string, the [NSString initFromData] call does come back with nil - apparently it does not like the data I passed as it's not valid UTF8. So what can I do? I cannot find a "binary data" encoding. And when I use some other encoding, then I might have to risk that when generating the actual SDP data that gets passed to other devices, it gets converted into a different encoding, altering my original data. How can this be solved? Thomas _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Thomas Tempelmann