• 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: NSURL fileURLWithPath doesn't produce a valid URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURL fileURLWithPath doesn't produce a valid URL


  • Subject: Re: NSURL fileURLWithPath doesn't produce a valid URL
  • From: Alexander Bokovikov <email@hidden>
  • Date: Fri, 31 Jul 2009 14:44:59 +0600


On 31.07.2009, at 14:02, Richard Frith-Macdonald wrote:

Why do you think that's not a valid URL?

It's because another code (Flash plugin) doesn't want to work if I provide a path (as a part of URL), containing "+" characters. At least I don't see other reasons, why the same function work for path with my home directory, and doesn't work with path, provided by _CS_DARWIN_USER_DIR.


If you look at RFC1738 you will see it explicitly says that a '+' is allowed.

Say it to Macromedia... or to Adobe?... Though I work with Flash directly (not by WebKit), so maybe the error is within my code, I leave such chance. Nevertheless, even in that case the error is just in the need of URL encoding, as I believe.


I suspect what you are actually looking for is a mechanism to encode a string for use as a field name or field value in a form encoded as the query string of a URL. If thats the case, you need to encode the '+' '=' and '&' characters yourself.

I was just about that. I've created a simple function, encoding necessary characters - blanks, pluses, etc., but I just would like to know if there is a standard way to do it by API usage. But you say - "do it yourself". Therefore I believe, the question is closed. Isn't it?


Thanks.

_______________________________________________

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


  • Follow-Ups:
    • Re: NSURL fileURLWithPath doesn't produce a valid URL
      • From: Dave Keck <email@hidden>
References: 
 >NSURL fileURLWithPath doesn't produce a valid URL (From: Alexander Bokovikov <email@hidden>)
 >Re: NSURL fileURLWithPath doesn't produce a valid URL (From: Dave Keck <email@hidden>)
 >Re: NSURL fileURLWithPath doesn't produce a valid URL (From: Alexander Bokovikov <email@hidden>)
 >Re: NSURL fileURLWithPath doesn't produce a valid URL (From: Richard Frith-Macdonald <email@hidden>)

  • Prev by Date: Re: Diagramming (a bit OT)
  • Next by Date: Re: NSURL fileURLWithPath doesn't produce a valid URL
  • Previous by thread: Re: NSURL fileURLWithPath doesn't produce a valid URL
  • Next by thread: Re: NSURL fileURLWithPath doesn't produce a valid URL
  • Index(es):
    • Date
    • Thread