Core: Add some more encode/decode dance to cope with FS encodings (I hope)