{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiggff4upxlycq7nfpzazgwit4obgezddvzcrgtzy6r2hqoqorq7wq",
"uri": "at://did:plc:hqad6xwuzg7oqfmwylfkvqfm/app.bsky.feed.post/3mimaragcnaw2"
},
"path": "/viewtopic.php?t=33205&p=271779#p271779",
"publishedAt": "2026-04-03T15:52:50.000Z",
"site": "http://forum.palemoon.org",
"textContent": "> > UnicodeDecodeError: 'utf-8' codec can't decode byte 0x91 in position 3: invalid start byte\n>\n> Was about to forward the idea to try detecting byte string encoding first using chardet.detect() and selecting best confidence, then pass selected encoding to decode() instead of utf-8. However a quick test revealed the fact that chardet is no longer part of the default Python3 installation at least since Python 3.9 if not earlier. Substitutes could be charset_normalizer or cchardet but those are external modules too. Dunno of any similar other default module that'd be available in all [usable] Python3 versions. Which means, even trying to install any of those modules in the venv might fail if the user has no Internet access.\n>\n> Or am I way off-track here? Can a prebuilt venv be deployed with the UXP code so that all necessary Python modules would be readily available? Maybe that's already the case, dunno.\n\nWe actually don't use pip or anything, we just slide external modules we want into the build system and wire them in via generated .pth files that are created when the venv is created, we have a mechanism for that already. So if you find an external Python module that can work around this problem, I'm definitely interested. Question is whether something like chardet would work reliably on the small snippets of text the build system sometimes receives from tools.\n\n* * *",
"title": "Platform Development • Re: I created a Python 3 port of UXP out of boredom...",
"updatedAt": "2026-04-03T15:52:50.000Z"
}