This is probably not correct. We would still need to force_encode first into default_external and then do a normal encode into the requested encoding. This behavior is different from how you first implemented it.