On Sep 8, 2007, at 09:23, Christiaan Hofman wrote:

>
> On 8 Sep 2007, at 5:17 PM, Adam R. Maxwell wrote:
>
>>
>> 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.
>>
>
> The parsing is no problem, that's just an NSScanner. I've now used -
> [NSString initWithBytes:length:encoding:]. It should be alright with
> the size, as the octal is at most 3 characters (excluding the "\")
> and the hex is 2 characters long. It's in the new SKFDFParser object.

I'm not on skim commits at home, so I missed that :).  That sounds  
like the same idea, though, using a C array instead of NSData.

So did you find some sample FDF files?  I'm curious now; from the  
parser code, it looks like they're similar to CGPDF dictionaries, but  
a quick google search says they're for PDF forms.

-- 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