def _check_locale_and_print_warning(self):
        """
        Method which checks that unicode locale is used and prints a warning if it's not.
        """
        try:
            default_locale = locale.getdefaultlocale()[0]
            preferred_encoding = locale.getpreferredencoding()
        except ValueError:
            # Ignore unknown locale errors for now
            default_locale = "unknown"
            preferred_encoding = "unknown"

        if preferred_encoding and preferred_encoding.lower() != "utf-8":
            msg = NON_UTF8_LOCALE % (default_locale or "unknown", preferred_encoding)
            LOGGER.warning(msg)

        Method which checks that unicode locale is used and prints a warning if it's not.
        
st2client/st2client/shell.py