• 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: NSString <--> MacRoman Pascal String
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString <--> MacRoman Pascal String


  • Subject: Re: NSString <--> MacRoman Pascal String
  • From: Uli Kusterer <email@hidden>
  • Date: Fri, 16 May 2003 19:52:57 +0200

Am Freitag, 16.05.03 um 19:33 Uhr schrieb Uli Kusterer:

BOOL NSStringToStr255( NSString* strobj, StringPtr outStr )
result = CFStringGetPascalString( (CFStringRef) strobj, outStr, sizeof(outStr), kCFStringEncodingMacRoman );

Figures...

just after I hit "send", the mistake jumped out at me: sizeof(outStr) would return 4, not 256 ... replacing sizeof() with 256 made it work just fine.

Sorry for the hot air, folks...

Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSString <--> MacRoman Pascal String (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: NSString <--> MacRoman Pascal String
  • Next by Date: Re: Future Objective-C changes
  • Previous by thread: Re: NSString <--> MacRoman Pascal String
  • Next by thread: Saving a NSMutableArray
  • Index(es):
    • Date
    • Thread