use codecs

Signed-off-by: Tiago Maluta <tiago.maluta@gmail.com>