Turns out the old way was working, I just had client encoding problems