'Create a new NavigableString.
When unpickling a NavigableString, this method is called with
the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be
passed in to the superclass\'s __new__ or the superclass won\'t know
how to handle non-ASCII characters.'

def __new__(cls, value):

    if isinstance(value, unicode):
        u = unicode.__new__(cls, value)
    else:
        u = unicode.__new__(cls, value, DEFAULT_OUTPUT_ENCODING)
    u.setup()
    return u
