Documentation
The doc of the sys.getfilesystemencoding function indicates:
[...] the encoding used with the filesystem error handler to convert between Unicode filenames and bytes filenames. The filesystem error handler is returned from getfilesystemencoding().
The filesystem error handler is actually returned by the sys.getfilesystemencodeerrors function.
Linked PRs