Encode path-like filename to the filesystem encoding and error handler; return bytes unchanged.
os.fsencode(filename)