fixed compile errors due to IEncoding::toByteArray changes