add in charset functions; add tests