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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to