added encoding as argument to RAW.pm