add source from svn trunk (revision 29)
extend encoder options to make string encoding configurable