• 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: stringWithContentsOfURL: usedEncoding: error:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stringWithContentsOfURL: usedEncoding: error:


  • Subject: Re: stringWithContentsOfURL: usedEncoding: error:
  • From: Greg Stark <email@hidden>
  • Date: Mon, 5 Jun 2006 21:15:28 -0600

I caught the error after I posted to the list (I copied the example from an outdated version of my source and have corrected it below). With the correction, I get the same error: The file could not be opened using the specified text encoding.

-Greg

On Jun 5, 2006, at 8:30 PM, Andy Lee wrote:

On Jun 5, 2006, at 10:11 PM, Greg Stark wrote:
NSStringEncoding enc;
NSError *error;
NSString *test = [NSString stringWithContentsOfURL:[URLsToOpen objectAtIndex:0]
usedEncoding:&enc
error:&error];

NSStringEncoding isn't an object, it's just a typedef for unsigned. Change


	NSStringEncoding *enc;

to

	NSStringEncoding enc;

--Andy

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: stringWithContentsOfURL: usedEncoding: error:
      • From: Adam Leonard <email@hidden>
References: 
 >stringWithContentsOfURL: usedEncoding: error: (From: Greg Stark <email@hidden>)
 >Re: stringWithContentsOfURL: usedEncoding: error: (From: Andy Lee <email@hidden>)

  • Prev by Date: is [[NSObject alloc] release] correct?
  • Next by Date: Re: is [[NSObject alloc] release] correct?
  • Previous by thread: Re: stringWithContentsOfURL: usedEncoding: error:
  • Next by thread: Re: stringWithContentsOfURL: usedEncoding: error:
  • Index(es):
    • Date
    • Thread