[PATCH] DLD upload
Rainer Mohr
mail at divelogs.de
Sat Mar 16 02:45:10 PDT 2013
Am 16.03.2013 um 01:43 schrieb Dirk Hohndel <dirk at hohndel.org>:
> Miika Turkia <miika.turkia at gmail.com> writes:
>>
>> I have also been playing with the attached patch. The debug print
>> seems to indicate that the buffer is formatted properly, but then it
>> just does not work. I wonder if this is related to the above oddity.
>
> That attached patch finally got me to look in the right direction.
>
> Here's what I just pushed.
>
> Please test (especially Sergey as you were the person initially
> reporting the problem).
>
> Rainer - from my experiments I am guessing that you have fixed size
> buffers for the strings that you export and that you don't account for
> the fact that the HTML encoding causes you to create 7 bytes per
> character... and I think that means that your buffers are too small and
> some strings get truncated in the middle - which then causes incorrect
> encodings like this:
>
> <BOATNAME><![CDATA[открыти&]]></BOATNAME>
> <CYLINDERDESCRIPTION><![CDATA[алюмиl]]></CYLINDERDESCRIPTION>
>
> in both cases the end of the string looks truncated,
This is a dabase limitation on my side. Boat and cylinder desription is a VARCHAR(50) in the database. Well enough for latin characters, but the html encoding that happens for non latin text uses 7 bytes per character and the INSERT truncates the text. So it's incomplete in the database. UTF8 will solve this, once I get down to doing that.
Rainer
More information about the subsurface
mailing list