[PATCH] DLD upload

Miika Turkia miika.turkia at gmail.com
Fri Mar 15 10:41:49 PDT 2013


On Fri, Mar 15, 2013 at 7:20 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> Miika Turkia <miika.turkia at gmail.com> writes:
>>> I think that's the way to go
>>> - stop escaping in xslt (we had a broken patch earlier in this thread)
>>> - convert on the C side; I still need to implement this whole "act
>>>   differently when things are imported from XSLT"
>>
>> I totally agree. However, our whole problem would disappear if Rainer
>> could change the current output to not contain the CDATA around
>> already escaped content. I would not be surprised if others importing
>> the current "double escaped" content is having trouble because of
>> that.
>
> Oh, you haven't been around Linus enough.
>
> The kernel philosophy is "WE DON'T BREAK USERSPACE".
> Translated to what we do here I'd paraphrase this as "we don't rely on
> others making changes so that our stuff becomes easier".
>
> So yes, of course I think that Rainer eventually might want to move into
> the 21st century with the way the site handles non-isi-8859-1 characters.
>
> But his site is an independent project and we should make sure that we
> can read what he provides today - and it is clearly possible to do so.
>
> If this was a clear bug on his side (like we had when talking to Nick
> about MacDive exports) than I might think about this differently - but
> what divelogs.de does today appears to be valid and parsable - so I
> don't see why we should say "oh, he needs to fix his end, first".
>
>>> As I expect to be able to connect to other web sites as well in the
>>> future, I think the need to decode the things that websites send us will
>>> be important.
>>>
>>> Now that leads me to a different question: are we doing the right thing
>>> in the other direction? i.e., encoding everything in a format that
>>> divelogs.de cam consume?
>>
>> As far as I know we are doing things correctly on the upload side. At
>> least uploading one sample dive with Cyrillic notes and cylinder
>> description is properly uploaded.
>
> Excellent. Thanks.
>
>>> Miika - I look at you as the maintainer of the XSLT part; can you look
>>> at the patch that was sent, clean things up and send this to me?
>>
>> I have attached my version of the patch (that is effectively exactly
>> same what Sergey sent, but that is what I already had in my xslt file
>> at the time).But as said I am not sure if this is the right way to go.
>> At least I would like to get input from Rainer first to hear his
>> opinion about the kind of double-encoding issue.
>
> Let me ask the question differently. If we add this patch and Rainer
> changes divelogs.de to use UTF-8 throughout - things will still work for
> us, correct? Because in that case the CDATA quoting will go away.
>
> So I don't see a downside of adding this patch.
>
> Am I missing something?

As far as I know it should not affect the possible UTF-8 input.

miika


More information about the subsurface mailing list