On Sep 8, 2007, at 03:47, Christiaan Hofman wrote:

> What is the best procedure to transform an octal or hexadecimal code
> (as in \ddd or A3) interpreted in a given encoding (which may not be
> UTF-8) into a character to be added to an NSString?

You can parse those (the hex/octal strings) as ASCII, right?  Since  
those are just integers (chars), add each one to an NSData, then  
intepret that as some encoding.  Maybe I've misunderstood the problem,  
though.

> If it were UTF-8
> I could simply parse the code, create a number, and use the %C format
> specifier. But what do I do for other encodings?

I'd be wary of that...isn't %C an Apple extension for a 16 bit  
unichar, whereas a UTF-8 character might be up to 4 bytes?  This stuff  
gets pretty confusing.

Adam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
skim-app-develop mailing list
skim-app-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-develop

Reply via email to