[lib] encodes name, accounts for possiblecçç error in result set