Summary: | sys-apps/less - auto convert UTF16/UTF32 inputs to active encoding | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Scott Bertilson <ssb> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED NEEDINFO | ||
Severity: | enhancement | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | cleaned up patch |
Description
Scott Bertilson
2011-04-28 23:18:12 UTC
post patches as attachments. bugzilla comments corrupts them. hardcodes paths are never acceptable. the invocation is also wrong as it will fail on files that begin with a dash. the logic also breaks as the comment indicates. the LANG parsing is wrong. pretty sure it should be LC_CTYPE. further, splitting on "." doesnt work for all possible names. it also will wrongly exit if the locale is invalid, or there is a conversion error. This bug has been open, awaiting a response for over two years now. If you are still interested in having this feature added, please attach a patch that is modified in response to vapier's feedback. (I am closing out old base-system bugs to get the list to a manageable size.) Created attachment 361536 [details, diff]
cleaned up patch
Cleaned up patch based on your comments. Sorry I didn't ever get back to you.
I think LANG needs to be included since that's the last resort, but from what I've read it should try to use in order of preference: LC_ALL LC_CTYPE LANG.
I'm not sure what to do about the parsing problem with using ".", but it seems reasonable to me for it to fall through if it can't find a second field after a ".".
I also changed it to fall through if iconv returns anything other than success since there are some conversions that it doesn't like such as ca_ES.UTF-8@valencia. I wasn't sure what to do about the error message in view of falling through - maybe it should go to /dev/null.
can you post some sample files and the locales you're using to view them ? |