From: Jorg S. <Jor...@gm...> - 2007-08-18 04:15:58
|
Javier Kohen wrote: > There is a bug in DB artwork writer, where it assumes that for a given > string S, with S8 being its UTF-8 representation and S16 its UTF-16LE > representation, 2 * len(S8) = len(S16). Unfortunately this very nice > property only holds for those characters that can be represented with > one byte in UTF-8, that is, the ASCII range. As far as I can see the strings processed in this function where filenames of thumbnails and therefore in ASCII. Your point is noted, though, and I have committed your patch. > I find it strange that the padding size falls in the range 1 to 4. > Shouldn't it be 0 to 3? Yes -- I've fixed that too. The parsers are sufficiently robust to accept either 0 or 4 it seems -- as long as the padding makes the length a multiple of 4. > The second patch replaces redundant calls to utf16_strlen with the > length value returned by g_utf8_to_utf16. Thanks -- the patch looks fine to me and I have submitted it. > I hope I can eventually get rid of the bug that's causing the copy of > the database on the iPod to become slightly corrupted after unmount :( I don't think this is related to libgpod, however :-( JCS. |