Use library encoding routines