Hello,
We noticed some problems with the Ippclient when using multi-byte characters. There is a bug in IppTag.java class where the length of the string is written incorrectly into the IppBuffer for multi-byte characters.
This is the code in IppTag (this is used in multiple places in IppTag class):
ippBuf.putShort((short)attributeName.length());
ippBuf.put(IppConverter.toBytes(attributeName));
The problem is that the length of the string is not the same as the length in bytes after encoding as some encodings have multy-byte characters (for example utf-8). We noticed this when sending a printjob with a job-name containing characters like è, é, ê, ë.
My fix would be as follows:
byte [] bytes = IppConverter.toBytes(attributeName);
ippBuf.putShort((short)bytes.length);
ippBuf.put(bytes);
I also informed the maker of ippclient (
https://trac.id.ethz.ch/projects/ippclient) of this problem and they will release a fix shortly.
Cheers,
Rien Nentjes