bugfix for encoding
test for arguments and encoding
check for garbage characters between records