Re: Escaping spaces in paths
Re: Escaping spaces in paths
- Subject: Re: Escaping spaces in paths
- From: Ondra Cada <email@hidden>
- Date: Tue, 25 Jun 2002 20:16:57 +0200
On Tuesday, June 25, 2002, at 07:42 , Jose L. Hales-Garcia wrote:
s=[[s componentsSeparatedByString:@"!"] componentsJoinedByString:@"\\!
"]
Thank you. I encountered a bug with the handling of the backslash
though
(see below). It would be great for my work if Apple fixed it soon.
So far as I know, there's no bug, just that NSLog is not a *print*
method,
but a *debug* method, and therefore it happily shows escapes by a kinda
haphazard way, presumed to be the most readable one in console. In the
actual string, though, all should be all right (do check yourself, eg.
using characterAtIndex:).
I ran a test. The results are included below.
...
2002-06-25 10:34:57.629 R[532] char in s at 6 is \\\\
That's quite right, is it not? If you don't believe that the "char \\\\"
is a real backslash (which it is, only NSLog tries not quite successfully
to be clever putting it out), you can change the last line to
NSLog(@"char in s at %d is %c (%x)", i, [s characterAtIndex:i], [s
characterAtIndex:i]);
;))))
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.