def get_locale ():
    """Search the default platform locale and norm it.
    @returns (locale, encoding)
    @rtype (string, string)"""
    try:
        loc, encoding = locale.getdefaultlocale()
    except ValueError:
        # locale configuration is broken - ignore that
        loc, encoding = None, None
    if loc is None:
        loc = "C"
    else:
        loc = norm_locale(loc)
    if encoding is None:
        encoding = "ascii"
    return (loc, encoding)
Search the default platform locale and norm it.
    @returns (locale, encoding)
    @rtype (string, string)