added the text encoding configuration and unified the command line protocol encoding and session text encoding