From: Michael M. <mic...@ma...> - 2004-06-30 19:02:35
|
Yeah, sounds fine. Two requests, though - wait until my current deluge=20= of checkins is over (another hour maybe) before you check that in, and=20= could you reorder the branches of the if for readability? if([k isEqualToString:@"Local-Url"] || [k isEqualToString:@"Url"]){ v =3D [pubFields objectForKey:k]; } else { v =3D [BDSKConverter stringByTeXifyingString:[pubFields=20 objectForKey:k]]; } Thanks -mike On Jun 30, 2004, at 11:52 AM, Adam Maxwell wrote: > > On Jun 30, 2004, at 13:37, Michael McCracken wrote: > >> I'm not totally sure, but I think URLs have to be ASCII. This might=20= >> mean that we don't have to convert those fields. I forget if we're=20 >> converting the whole entry as one string or if we do it=20 >> field-by-field, though. > > Okay, my docs for NSURL say: > > "An NSURL will fail to create if the path being passed is not=20 > well-formed (complies with RFC 2396). Examples of cases that will not=20= > succeed are strings containing space characters and high-bit=20 > characters. Should creating an NSURL fail, the methods will return=20 > nil, which you must be prepared to handle." > > In my local copy of BibItem -bibTeXString, I added this a couple days=20= > ago: > > if(!([k isEqualToString:@"Local-Url"] || [k = isEqualToString:@"Url"])){ > v =3D [BDSKConverter stringByTeXifyingString:[pubFields=20 > objectForKey:k]]; > } else { > v =3D [pubFields objectForKey:k]; > } > > which works fine with ascii urls/filenames. > > Look okay? > > -- adam > >> >> On Jun 30, 2004, at 11:32 AM, Adam Maxwell wrote: >> >>> >>> On Jun 30, 2004, at 13:08, Michael McCracken wrote: >>> >>>> Tilde is an ASCII character so it should work fine with btparse. I=20= >>>> guess there might be a Unicode tilde that doesn't work with=20 >>>> btparse, but I'm not sure what to do about that... >>> >>> Tilde is fine. I was thinking of someone who filed papers with a=20 >>> local url of ~/Articles/B=FCrger/apaper.pdf or something like that. =20= >>> We need to run the converter over those or they'll get lunched in=20 >>> BibTeXParser, and no more url. If the converter converts tildes or=20= >>> percents, though, urls will get some funny escapes in them, so I=20 >>> guess I should remove those from the dictionary. >>> >>> --=20 >>> adam >>> >>>> >>>> -mike >>>> >>>> On Jun 29, 2004, at 5:22 PM, Adam Maxwell wrote: >>>> >>>>> >>>>> On Jun 27, 2004, at 18:02, Adam Maxwell wrote: >>>>> >>>>>> I unthinkingly introduced an ugly bug into 0.95. If you have=20 >>>>>> entries with Url/Local-Url fields containing a tilde, the tilde=20= >>>>>> will be converted into {\~~}. This will also be a problem with=20= >>>>>> percents, now that we can convert those. >>>>>> >>>>>> Question: should we ignore the tilde/percent as in previous=20 >>>>>> versions, or (somehow) skip running the BDSKConverter on url=20 >>>>>> fields? I think this could also cause problems if people have=20 >>>>>> local paths with accented character names in them, so I'm=20 >>>>>> surprised it hasn't come up before. >>>>> >>>>> Still thinking about this one. Perhaps the converter does need to=20= >>>>> run on URL and Local-Url fields, or else those accented characters=20= >>>>> _won't_ be correct in BibDesk, since the parser doesn't like=20 >>>>> non-ascii. Any suggestions, or is everyone else as confused as=20 >>>>> me? >>>>> >>>>> --=20 >>>>> Adam >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------- >>>>> This SF.Net email sponsored by Black Hat Briefings & Training. >>>>> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -=20 >>>>> digital self defense, top technical experts, no vendor pitches,=20 >>>>> unmatched networking opportunities. Visit www.blackhat.com >>>>> _______________________________________________ >>>>> Bibdesk-develop mailing list >>>>> Bib...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/bibdesk-develop >>>>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email sponsored by Black Hat Briefings & Training. >>> Attend Black Hat Briefings & Training, Las Vegas July 24-29 - >>> digital self defense, top technical experts, no vendor pitches, >>> unmatched networking opportunities. Visit www.blackhat.com >>> _______________________________________________ >>> Bibdesk-develop mailing list >>> Bib...@li... >>> https://lists.sourceforge.net/lists/listinfo/bibdesk-develop >>> > > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Bibdesk-develop mailing list > Bib...@li... > https://lists.sourceforge.net/lists/listinfo/bibdesk-develop > |