import six


def force_unicode(string, charset="utf-8"):
    """Convert string to unicode if it is not yet unicode.

    Params:
        string : string/unicode : an input string
        charset : string : optional : output encoding

    Returns:
        unicode

    """
    if isinstance(string, six.text_type):  # Always True on Py3
        return string
    return string.decode(charset, "replace")