• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hex representation of NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hex representation of NSString


  • Subject: Re: Hex representation of NSString
  • From: Chris Blättermann <email@hidden>
  • Date: Mon, 18 Aug 2008 13:26:37 +0200

Hi there!

Just subscribed to this list.

@Robert:
Do you mean by hex representation this:

hello -> 0x68 0x61 0x6C 0x6C 0x6F ?

Then I suggest you use the C language to do it, just "convert" a string to an array of characters by

[yourstring UTF8String]

And loop through the result and printf it.

Kind regards,

Chris

Am 18.08.2008 um 12:45 schrieb Negm-Awad Amin:


Am Mo,18.08.2008 um 12:40 schrieb Robert Černý:


I don't like it because the string will be converted. I'm interested in exact values
Oh, may I ask why? The string class encapsulates its representation.

Anyway, if you want to look "inside" the instance, you probably have to subclass it or doing some undocumentated stuff.

Cheers,

Amin


and even allowLossyConversion:NO doesn't guarantee it. Or am I wrong?

Robert

2008/8/18 Negm-Awad Amin <email@hidden>

Am Mo,18.08.2008 um 12:21 schrieb Robert Černý:


Hi,I'm trying to find a way how to get hex representation of NSString. I
know I can convert NSString to NSData but I would like to rather not to do
it. Or am I missing anything obvious?
Maybe: Do it this way.


Why don't you like it?

Cheers,
Amin

BTW: This isn't the hex representation, but the binary, serialized representation. Hex, octal and so on are terms used in relation to display something.



Thanks
Robert
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

Amin Negm-Awad
email@hidden






Amin Negm-Awad email@hidden




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

Am 18.08.2008 um 13:18 schrieb Robert Černý:

Actually,I'm trying to debug some weird problems with clipboard. My problem
is that data copied into clipboard from legacy java application doesn't
match data pasted into Cocoa application. I've got data with accented
characters which gets converted through MacOS Roman encoding even the visual
representation in java is correct.


Robert

2008/8/18 Negm-Awad Amin <email@hidden>


Am Mo,18.08.2008 um 12:40 schrieb Robert Černý:


I don't like it because the string will be converted. I'm interested in
exact values


Oh, may I ask why? The string class encapsulates its representation.

Anyway, if you want to look "inside" the instance, you probably have to
subclass it or doing some undocumentated stuff.


Cheers,

Amin


and even allowLossyConversion:NO doesn't guarantee it. Or am I wrong? Robert 2008/8/18 Negm-Awad Amin <email@hidden>


Am Mo,18.08.2008 um 12:21 schrieb Robert Černý:

Hi,I'm trying to find a way how to get hex representation of NSString. I
know I can convert NSString to NSData but I would like to rather not to
do
it. Or am I missing anything obvious?


Maybe: Do it this way.

Why don't you like it?

Cheers,
Amin

BTW: This isn't the hex representation, but the binary, serialized
representation. Hex, octal and so on are terms used in relation to display
something.




Thanks Robert _______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com


Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


Amin Negm-Awad email@hidden






Amin Negm-Awad email@hidden





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Hex representation of NSString (From: "Robert Černý" <email@hidden>)
 >Re: Hex representation of NSString (From: Negm-Awad Amin <email@hidden>)
 >Re: Hex representation of NSString (From: "Robert Černý" <email@hidden>)
 >Re: Hex representation of NSString (From: Negm-Awad Amin <email@hidden>)
 >Re: Hex representation of NSString (From: "Robert Černý" <email@hidden>)

  • Prev by Date: Re: Hex representation of NSString
  • Next by Date: Clearing a Memory Buffer?
  • Previous by thread: Re: Hex representation of NSString
  • Next by thread: Re: Hex representation of NSString
  • Index(es):
    • Date
    • Thread