Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Thumbnails are missing
#5
@steve4star It looks like you have the Prefs option "UTF8 character filter" enabled. What happens when you turn it off?

The log entry below indicates some sort of problem creating the library cache file. Another oddness is that the file path in the error message is incomplete. It should be something like "/var/local/www/libcache_all.json"

Code:
20230206 201147 genLibraryUTF8Rep(): Error: file create failed: /var/local/www/libcache

The dev that created the UTF8 filter function several years ago is no longer contributing to moOde so I've listed the function below if anyone has some insights into what it's actually doing.

Code:
// UTF8 replace (@lazybat)
function utf8rep($str) {
    // Reject overly long 2 byte sequences, as well as characters above U+10000 and replace with ? (@lazybat)
    $str = preg_replace('/[\x00-\x08\x10\x0B\x0C\x0E-\x19\x7F]'.
        '|[\x00-\x7F][\x80-\xBF]+'.
        '|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*'.
        '|[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})'.
        '|[\xE0-\xEF](([\x80-\xBF](?![\x80-\xBF]))|(?![\x80-\xBF]{2})|[\x80-\xBF]{3,})/S',
        '--', $str);

    // Reject overly long 3 byte sequences and UTF-16 surrogates and replace with ?
    $str = preg_replace('/\xE0[\x80-\x9F][\x80-\xBF]'.
        '|\xED[\xA0-\xBF][\x80-\xBF]/S','--', $str);

    return $str;
}
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
Thumbnails are missing - by steve4star - 02-06-2023, 08:49 PM
RE: Thumbnails are missing - by Nutul - 02-06-2023, 09:23 PM
RE: Thumbnails are missing - by steve4star - 02-06-2023, 09:35 PM
RE: Thumbnails are missing - by TheOldPresbyope - 02-06-2023, 10:17 PM
RE: Thumbnails are missing - by steve4star - 02-06-2023, 10:30 PM
RE: Thumbnails are missing - by steve4star - 02-07-2023, 08:12 PM
RE: Thumbnails are missing - by Tim Curtis - 02-06-2023, 10:25 PM

Forum Jump: