taint has asked for the wisdom of the Perl Monks concerning the following question:
Today I went out looking for something like Padre (a replacement for) after having real bad experiences with it. I only found a couple of editors, but they were immature. So no joy. Anyway, to the point. As a rule, I always examine any code before I install it. I look for mixed charset, mixed line endings, or other "oddities" I feel makes for a bad release. Maybe it's just me, but, in this day, and age; it's hard to imagine anyone releasing source that isn't utf-8, with unified line endings, and has no trailing/hanging spaces. To me, anything else, is just bad policy. Anyway. It's such a pill performing the "unification" task within my editor, and when confronted with mixed-iso files, I don't trust the frequently used shell scripts that convert/unify line endings not to corrupt documents that aren't all utf-8 encoded (without BOM). So what I guess I'm asking; does anyone know of a Perl script that safely "unifies" text/source files? Or can anyone suggest a way to do it?
Thanks for all your consideration.
--Chris
EDIT: Line endings, and trailing spaces are trivial to changeYes. What say about me, is true.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is there a good way to unify text files something like dos2nix shell script(s) do?
by soonix (Chancellor) on Dec 20, 2013 at 09:03 UTC | |
|
Re: Is there a good way to unify text files something like dos2nix shell script(s) do?
by Laurent_R (Canon) on Dec 20, 2013 at 18:54 UTC | |
by taint (Chaplain) on Dec 20, 2013 at 19:04 UTC | |
|
Re: Is there a good way to unify text files something like dos2nix shell script(s) do?
by 2teez (Vicar) on Dec 20, 2013 at 05:21 UTC | |
by taint (Chaplain) on Dec 20, 2013 at 05:44 UTC | |
by Anonymous Monk on Dec 20, 2013 at 13:12 UTC |