Bug 638312

Summary: RFE: [patch] allow less to display utf-16 text files
Product: [Fedora] Fedora Reporter: James Antill <james.antill>
Component: lessAssignee: Vojtech Vitek <vvitek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: hripps, mbooth, meyering, npajkovs, rjones
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: less-436-13.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-15 21:34:20 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
diff against lesspipe on F-13 none

Description James Antill 2010-09-28 18:29:55 UTC
Description of problem:
I have a bunch of utf-16 text files, and less can't read them. Here is a quick patch for lesspipe which allows less to read them.

Comment 1 Fedora Admin XMLRPC Client 2010-11-29 10:52:38 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 James Antill 2010-11-29 16:16:50 UTC
Created attachment 463524 [details]
diff against lesspipe on F-13

 I thought I'd added this when I opened the bug, sorry...

Comment 3 Vojtech Vitek 2011-02-09 13:51:01 UTC
Thank you, James. I will include this in next less release.

Comment 4 Vojtech Vitek 2011-02-10 14:55:16 UTC
I will rewrite the patch, because we can't rely on less running on UTF-8 environment only.
I will also use /usr/bin/iconv instead of /usr/bin/recode, as it is in glibc-common package.

Comment 5 Vojtech Vitek 2011-02-15 14:05:28 UTC
Fixed in less-436-12.fc16 and less-436-12.fc15.

Comment 6 Fedora Update System 2011-02-15 14:49:37 UTC
less-436-10.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/less-436-10.fc14

Comment 7 Fedora Update System 2011-02-15 14:50:43 UTC
less-436-9.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/less-436-9.fc13

Comment 8 Fedora Update System 2011-02-18 15:05:24 UTC
less-436-12.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/less-436-12.fc15

Comment 9 Fedora Update System 2011-02-21 07:30:57 UTC
less-436-10.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2011-03-03 02:59:44 UTC
less-436-12.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2011-04-02 22:48:50 UTC
less-436-9.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Richard W.M. Jones 2011-04-13 13:14:58 UTC
This causes a regression: Any file that has the string "UTF-16"
in the *name* of the file is displayed as if it was UTF-16.

For example try this sequence of commands:

$ echo "hello, world" > hello.txt
$ less hello.txt 
$ mv hello.txt hello-UTF-16.txt
$ less hello-UTF-16.txt 

I would suggest investigating the file -b option.

Comment 13 Vojtech Vitek 2011-04-13 13:49:36 UTC
Thanks Richard, I am going to fix this soon.

Comment 14 Fedora Update System 2011-04-13 14:47:16 UTC
less-436-13.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/less-436-13.fc15

Comment 15 Fedora Update System 2011-04-13 14:52:15 UTC
less-436-11.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/less-436-11.fc14

Comment 16 Fedora Update System 2011-04-13 15:03:37 UTC
less-436-10.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/less-436-10.fc13

Comment 17 Fedora Update System 2011-04-15 21:34:15 UTC
less-436-13.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2011-04-17 21:21:34 UTC
less-436-11.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.