Version 2.0.0 for new API foreign encoding functions