Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 235420

Summary: File does not recognize a UTF-16, little-endian encoded XML file
Product: Red Hat Enterprise Linux 5 Reporter: Dave Malcolm <dmalcolm>
Component: fileAssignee: Tomas Smetana <tsmetana>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: psplicha
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 22:02:49 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:
Attachments:
Description Flags
Input file (sticking to 7-bit characters)
none
output file, should be UTF-16 little-endian encoding none

Description Dave Malcolm 2007-04-05 17:29:46 UTC
Description of problem:
Attached is an XML file, which I believe is a correctly encoded UTF-16,
little-endian encoded XML file (c.f. :
http://www.w3.org/TR/REC-xml/#sec-guessing )

xmllint reads it fine.

However running "file" on it gives blank output:
file output.xml
output.xml: 

Version-Release number of selected component (if applicable):
file-4.17-8

How reproducible:
100%


Steps to Reproduce:
1. Take an XML file, run "xmllint --encode UTF-16 input.xml > output.xml"
2. xmllint output.xml
3. file output.xml
  
Actual results:
xmllint reads the file fine but file gives no useful output:
file output.xml 
output.xml: 
(i.e. blank output)

Expected results:
either:
  output.xml: XML 1.0 document text
or:
  output.xml: XML 1.0 document text (UTF-16 little-endian encoding)
or somesuch

Comment 1 Dave Malcolm 2007-04-05 17:29:46 UTC
Created attachment 151788 [details]
Input file (sticking to 7-bit characters)

Comment 2 Dave Malcolm 2007-04-05 17:30:35 UTC
Created attachment 151789 [details]
output file, should be UTF-16 little-endian encoding

Comment 3 RHEL Program Management 2008-06-04 22:49:44 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 errata-xmlrpc 2009-01-20 22:02:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0208.html