Re: Small patch for handling non-breaking spaces.
Jason Townsend <[email protected]> Tue, 8 Mar 2005 20:47:57 -0800
| Newsgroups | gmane.network.fire.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mar 8, 2005, at 8:10 PM, Mark Rowe wrote: > On Mar 9, 2005, at 4:03 PM, Robert Menteer wrote: >> Here is a small patch for handling non-breaking spaces. >> > [snip] > > The patch seems logical, but I don't understand the use of \xCA's > throughout it. My understanding is that Unicode's NO-BREAK SPACE is > at codepoint U+00A0, which is \xc2\xa0 using UTF-8. What am I > missing? I think this would be better to do with something like this: [NSString stringWithFormat:@"%C",0x00A0] (assuming that Mark is right about the Unicode code point). The problem is I'm not sure there's any way to guarantee what encoding is used when you put a hex escape into an NSString constant. The %C always means provide a unichar, which is unambiguous. I'm guessing 0xCA is the MacRoman encoding of this character. -Jason
smime.p7s
(application/pkcs7-signature, 2.3 KB) - not displayed