Bug 82652
Summary: | hpoj "obsolete configuration file format" error with UTF-8 locale | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Brett Dufault <brettzilla> |
Component: | perl | Assignee: | Petr Rockai <prockai> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 9 | CC: | aoliva, dbasinge, elias-m, grdetil, j, marcm, milan.kerslager, twaugh, yeti |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | ALL | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-11-12 01:20:51 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 88086 | ||
Attachments: |
Description
Brett Dufault
2003-01-24 14:55:13 UTC
Does it help to put 'use utf8;' after 'use strict;' at the beginning of that script? Still got same "obsolete conf" errors after adding 'use utf8;' after 'use strict;' (when using en_US.UTF-8 locale). Please attach the config file you have. Thanks. Created attachment 89575 [details]
hpoj config file for HP OfficeJet K80 (USB)
Original file location was /etc/ptal/mlc:usb:OfficeJet_K80
Smaller test case: echo abc | perl -ne 'use locale;print if /[^\s]+/' Actual output: (nothing) Expected output: abc *** Bug 82799 has been marked as a duplicate of this bug. *** Created attachment 90300 [details]
Patch that works around the perl problem for real.
The path that''s in place in 0.90-12 (phoebe3) didn't quite work. Setting this
variable after the perl script starts doesn't seem to have the intended effect.
This ugly work around seems to do better.
Created attachment 90647 [details]
Patch against 0.90-14 that fixes the problem for good.
Except the patch that fixed it for real didn't fix it at all. It isn't even
correct perl. I know I tested it and it worked, but it might be that I
inadvertently had LANG=C set in the environment, because upon further attempts
to use the printer (you can tell I don't use it very often, can't you? :-) it
was broken again :-(
Anyway, this patch seems to be better perl code, and it was tested for sure
with LANG=C and LANG=en_US.UTF-8, and in both cases it did the right thing.
Deep apologies for the wasted time.
Thanks, applied in hpoj-0.90-15. *** Bug 87763 has been marked as a duplicate of this bug. *** To get RedHat 9 to configure a HP OfficeJet K80xi via usb, I had to upgrade redhat-config-printer and redhat-config-printer-gui to 0.6.49. Completely separate issue. This bug report is about perl's broken regular expression handling in UTF8 causing the hpoj initscript to fail. A work-around would probably be: export LANG=C service hpoj restart (on each boot) *** Bug 88956 has been marked as a duplicate of this bug. *** Looks like this might be fixed in perl-5.8.1-0.pre19333.1. Red Hat Enterprise Linux 3 has the problem too. Created attachment 96597 [details] Workaround for hpoj on RH9 hpoj-0.90-14 on RH9 with UTF-8 locale was still a no-go for me, generates the same "obsolete configuration" message as previous hpoj versions. Attached is a workaround I've been using with hpoj-0.90-14 on RH9, basically a variation of Tim Waugh's comment #13. Instead of having /etc/rc.d/init.d/hpoj as a symlink to the /usr/sbin/ptal-init script, I turned it into a more traditional init.d script that sets LANG=C and calls ptal-init. A bit cheezy, but it avoids having to do a manual export/restart after each boot. I don't have RHEL 3 installed here, but looks like that's also using hpoj-0.90-14, so might be worth trying something similar there. I can confirm that hpoj is working for me using en_US.UTF-8 on Fedora Core 1 (i.e., with hpoj-0.90-19 and perl-5.8.1-92). How about the actual perl bug causing the problem, with the test case in comment #5? (It works for me in Fedora Core 1). Test case from comment #5 fails for me on RH9/perl-5.8.0-88.3. Works for me using Fedora Core 1/perl-5.8.1-92. (en_US.UTF-8 locale in each case.) Playing catch-up here (apologies, been on the road a lot for work). I can confirm that applying Alexandre's patch from comment #8 to hpoj-0.90-14 worked for me with RH9. Seems like a simpler solution than the cheezy init.d script approach I mentioned in comment #17. Test case from comment #5 fails for me on RHEL 3 (perl-5.8.0-88.4). This bug is real candidate for RHEL3 errata (see bug #112339). I had also problemms with hpoj since RHL 9 was released. But then hpoj-90 build 15 worked fine. RHEL 3 came out with build 14. It means it has the same problemm! Why wasn't hpoj not upgraded to a newer build? Heck I even recompiled hpoj from Fedora Core 1 on RHL (rebuild the src rpm) and it works!!! Why shit a broken version when there is a fix for it???!!! It is important to remember that this is a perl bug, not a bug in hpoj. This bug is fixed in all current Red Hat perl releases - closing out. |