def _decode_field(s, prev=None):
    """
        Decode a single field according to the Lightstreamer encoding rules.
        1. Literal '$' is the empty string.
        2. Literal '#' is null (None).
        3. Literal '' indicates unchanged since previous update.
        4. If the string starts with either '$' or '#', but is not length 1,
           trim the first character.
        5. Unicode escapes of the form uXXXX are unescaped.

        Returns the decoded Unicode string.
    """
    if s == "$":
        return ""
    elif s == "#":
        return None
    elif s == "":
        return prev
    elif s[0] in "$#":
        s = s[1:]
    return s.decode("unicode_escape")