Bug 174348
Summary: | file munges non-ASCII filenames in output | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Bastien Nocera <bnocera> | ||||||
Component: | file | Assignee: | Radek Vokál <rvokal> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Mike McLean <mikem> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 4.0 | CC: | jlaska, tao | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | RHBA-2006-0340 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2006-05-17 19:39:21 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: | 187538 | ||||||||
Attachments: |
|
Description
Bastien Nocera
2005-11-28 11:43:56 UTC
Created attachment 121536 [details]
file-cannot-handle-utf-1.sh
Well, this solves the problem with UTF, but what about if the file had \n embedded in it, or other terminal escape sequences? Also what if the string did not come from a symlink, but from a %s magic? Is it really UTF then? What about using iswctype(), after converting each mb sequence to a wchar_t, instead of using isprint()? Created attachment 121591 [details]
file-escape-mb-sequences.patch
Try to parse the output buffer as a multi-byte sequence. If it fails at any
point, fall back on the old ASCII based escape.
Slightly modified patch applied on rawhide, file-4.16-4 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 the 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-2006-0340.html |