#!/usr/bin/env python import locale loc= locale.getdefaultlocale() print 'Default system\'s encoding=', loc