Use c encoding functions