Add custom string encoding handling.