KONICA MINOLTA whitespace make and model parsing
Is your feature request related to a problem? Please describe. The whitespace in the "KONICA MINOLTA" make name causes an issue in incorrectly parsing the make. e.g.
"KONICA MINOLTA bizhub C451i" is incorrectly parsed as make="KONICA" and model="MINOLTA bizhub C451i"
Describe the solution you'd like
It would be nice if make="KONICA MINOLTA"
I'm posting this as a feature request as it is purely aesthetic, there is no loss in functionality.
Hi @dkosovic ,
thank you for filing the issue!
Would you mind telling me when you get this behavior? Can you provide commands/steps after which you see this behavior?
Thank you in advance!
To add the Konica Minolta printers, I've been doing something like:
lpadmin -p printer1 -E -m everywhere -v ipp://printer1.svcs.eait.uq.edu.au/ipp/print
Querying printer for printer-make-and-model attribute:
$ /usr/bin/ipptool -t -v ipp://printer1.svcs.eait.uq.edu.au/ipp/print get-printer-attributes.test | grep make
printer-make-and-model (textWithoutLanguage) = KONICA MINOLTA bizhub C450i
Querying the corresponding IPP Everywhere CUPS 2.4.12 queue for printer-make-and-model attribute:
$ /usr/bin/ipptool -t -v ipp://localhost/printers/printer1 get-printer-attributes.test | grep make
printer-make-and-model (textWithoutLanguage) = MINOLTA bizhub C450i - IPP Everywhere
I've done the same for a HP plotter for printer-make-and-model attribute:
-
printer-make-and-model (textWithoutLanguage) = HP DesignJet Z6dr 44in -
printer-make-and-model (textWithoutLanguage) = DesignJet Z6dr 44in - IPP Everywhere(with CUPS 2.4.12 queue)
So, looks like CUPS 2.4.12 printer-make-and-model attribute, the intention is to remove the make from the printer-make-and-model attribute, although it fails with "KONICA MINOLTA" where only "KONICA" is removed.
In my own locally modified CUPS, I've been doing the following for the make and model variables to be correct when the make is "KONICA MINOLTA" (it is just after the "Hewlett Packard" normalization code in cups/ppd-cache.c ):
diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c
index a6163a0e1..28cfe83c1 100644
--- a/cups/ppd-cache.c
+++ b/cups/ppd-cache.c
@@ -3325,6 +3301,11 @@ _ppdCreateFromIPP2(
if (!_cups_strncasecmp(model, "HP ", 3))
model += 3;
}
+ else if (!_cups_strncasecmp(make, "KONICA MINOLTA ", 15))
+ {
+ model = make + 15;
+ strlcpy(make, "KONICA MINOLTA", sizeof(make));
+ }
else if ((mptr = strchr(make, ' ')) != NULL)
{
/*