Bug 681836

Summary: lpstat bug with ASCII encoding, LANG=en_US.ASCII lpstat -h localhost -s
Product: Red Hat Enterprise Linux 6 Reporter: Jan Ščotka <jscotka>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: low    
Version: 6.1CC: azelinka, jpopelka, pknirsch, prc
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: cups-1.4.2-40.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 759081 (view as bug list) Environment:
Last Closed: 2011-12-06 15:28:31 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: 759081    

Description Jan Ščotka 2011-03-03 11:54:41 UTC
Description of problem:
Hi,
I've found unpeasant problem, I've had created some printers (not important, it is enought to have any) I found it whne testing bug
https://bugzilla.redhat.com/show_bug.cgi?id=642448
using ASCII as an enconfing of chars causes that nothing is writen to stdout
(for me it seems that cups somewhere match ASCII string and then go thru another way) 

Version-Release number of selected component (if applicable):
# rpm -qa cups\*
cups-1.4.2-39.el6.x86_64
cups-libs-1.4.2-39.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. service cups start
2. install any printers 
3. LANG=en_US.ASCII lpstat -h localhost -s
  
Actual results:
==nothing on output==

Expected results:
no system default destination
device for file: /tmp/xxxxx.out
device for tofile: socket://localhost:12000

Additional info:
any other string for enconding provide same proper output:
# lpstat -h x86-64-v02 -s
# LANG=en_US.ISO-8859-1 lpstat -h x86-64-v02 -s
# LANG=en_US.US-ASCII lpstat -h x86-64-v02 -s
# LANG=en_US.SSS lpstat -h x86-64-v02 -s
# LANG=uss.enterprise lpstat -h x86-64-v02 -s

strace ends with:
open("/usr/share/cups/charmaps/us-ascii.txt", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/cups/charmaps/us-ascii.txt", O_RDONLY) = -1 ENOENT (No such file or directory)
exit_group(0)                           = ?

Comment 9 errata-xmlrpc 2011-12-06 15:28:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1635.html