Message 174577 - Python tracker
On FreeBSD both Serhiy's original test case as well as the unit test work if the locale is ISO8859-15: >>> sys.getdefaultencoding() 'utf-8' >>> sys.getfilesystemencoding() 'iso8859-15' >>> locale.getpreferredencoding(True) 'ISO8859-15' >>> locale.getpreferredencoding(False) 'ISO8859-15' Naturally, if the locale is utf-8 the test works as well.