>>----- Originale Nachricht ----- >>>On Mar 15, 2011, at 10:51 PM, manner.moe@gmx.de wrote: >>>> ----- Originale Nachricht ----- >>>> >>>> >>>>> not fixed yet: >>>> >>>>> - links to string table (title, artist, album) are not set correctly? >>>>> title is stored at index 01 (0x40010) of string table but is shown as >>>>> "unknown title" in himddump, artist and album are not set. >>>> >>>> O.K., encoding is not set in the string table. >>>> By setting encoding (first byte of string field) the title will be shown >>>> correctly. >>The code for setting encoding byte looks fine, i don´t know what´s going >>wrong there. >>I changed this byte manually for testing. >This is a windows specific error, on my computer g_get_charset(...) gets >CP1252, so HIMD_ERROR_UNKNOWN_ENCODING is set. >We should check for errors from status after calling himd_add_string() in >himddump.c or break the code at "unknown encoding" errors to let >himd_add_sting() fail. In himddump.c at get_songinfo(...) strings are already converted to utf8 by libid3tag, so why asking for current charset in himd_add_string() instead of setting HIMD_ENCODING_LATIN1 directly? The current charset is not the same as the encoding for a string read from an id3 tag. If current charset is utf16 the encoding byte might be set to utf16 for an utf8 string. Or maybe we can use something like this: struct enc_string { char * string; int encoding; } So we can set the correct encoding when reading the string. What do you think? Thomas