start to move string charset handling from proxy to class
fix BSD build