Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

characters that have a code upper than 127 are not printed correctly #91

Closed
atiertant opened this issue Jan 6, 2021 · 1 comment
Closed

Comments

@atiertant
Copy link

atiertant commented Jan 6, 2021

using this code:

var ipp = require('ipp');
var PRINTER_URL = "http://x.x.x.x:631/ipp/printer";
var printer = ipp.Printer(PRINTER_URL, {language: 'fr'});
var msg = {
  "operation-attributes-tag": {
    "requesting-user-name": "Atlbusiness",
    "job-name": 'test',
    'attributes-natural-language': 'fr',
    "document-format": "application/octet-stream"
  },
  data: Buffer.from('abcd é')
};

printer.execute("Print-Job", msg, function(err, res){
  if (err) {
    console.log(err);
  }
  console.log(JSON.stringify(res));
});

the printer print correctly "abcd" but the "é" is not printed correctly, there is on other character instead.
this is the same for all characters that have a code upper than 127.

the result logged is:
{"version":"2.0","statusCode":"successful-ok","id":6110892,"operation-attributes-tag":{"attributes-charset":"utf-8","attributes-natural-language":"en"},"job-attributes-tag":{"job-uri":"ipp://NPIB4564E.local/ipp/print/0802","job-id":802,"job-state":"pending","job-state-reasons":"none"}}

i tryed add/remove language option and attributes-natural-language but nothing help

@atiertant
Copy link
Author

this was a bug in my pclkit lib, now fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant