The segfault is originating from "to_utf"