Rewrite tr_trans

    - I had add a new private method tr_trans_ascii_only to deal with
      ascii only string.
    - In order to get the best performance, I did not follow the DRY
      rule.
    - Solve multiple char issue(#3015) also.
    - The code still need refactor