def replace_check(c):
    """
    Replace non-ASCII chars with their code point
    """
    if ord(c) <= ord('~'):
        return c
    return '<%(orig)c:U+%(point)04X>' % {
        'orig': c,
        'point': ord(c)
    }