Re: ellipsis problem
Re: ellipsis problem
- Subject: Re: ellipsis problem
- From: email@hidden (Hado Hein)
- Date: Mon, 7 Sep 2009 15:34:32 +0200
- Organization: handmade !
Jan E. Schotsman <email@hidden> wrote:
> On Sep 6, 2009, at 8:44 PM, Jens Alfke wrote:
>
> > What function are you calling to print the string containing the
> > ellipsis? Either of these works for me:
> > NSLog(@"It was quiet\u2026too quiet.");
> > puts([@"It was quiet\u2026too quiet." UTF8String]);
> >
> > —Jens
>
> I thought I had tried all three of system encoding, UTF8 or MacRoman
> but actually UTF8 does work. My bad.
> I still think CFShow should print the ellipsis.
>
> CFStringRef myStr =
> CFStringCreateWithFormat( 0, 0, CFSTR("It was quiet
> %C too quiet."), 0x2026 );
> CFShow( myStr );
>
> Result in console: It was quiet\u2026 too quiet.
CFShow
Prints a description of a Core Foundation object to stderr.
For my view it's a debugging function, not a printing function.
The result looks like what is the logical description of your string
object (showing a string is giving it out).
See
http://developer.apple.com/mac/library/documentation/CoreFoundation/Conc
eptual/CFStrings/Articles/Converting.html#//apple_ref/doc/uid/20001187-1
01121
for String Conversions.
CFShow probably requests ASCII (since this is what consoles were born
with and what they're said to understand) and so the result is correct.
Perhaps it helps if you convert your string to nonlossy-ASCII (which has
the ellipsis) and then "print" it with CFShow.
This behaviour shuld be confirmable in the CF Sources - if you have the
CFLite Sources, which I don't have.
I'd wonder if stderr knows about two byte chars at all.
--
Hado Hein (KSK, DTHG), Berlin
followme office +49.30.91688488
www.beleuchtungsbildner.de - Stage Lighting Directing
www.batchmaker.de - Stage Lighting Design, Control and Routing
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden