Fix btoa convertion trouble by adding unescaping and uri encode process