You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, many thanks for putting this up - I think it's brilliant. In addition to code refactoring this is tremendously useful for people editing and revising books (with LaTeX, markdown and/or reStructured Text sources). For this purpose it would be very helpful to have repren deal also with non-ascii characters (e.g. accented characters in foreign words).
Would you consider adding an --encoding option to enable users to specify file encoding? repren could then decode the inputs read from pattern and input files to unicode, do all the internal processing in unicode and then encode again when writing output.
The text was updated successfully, but these errors were encountered:
I actually avoided giving the program knowledge of encodings since then binary files, weird encodings, malformed UTF8, etc would cause random Python encoding exceptions. By working at byte level it should work on anything. (Well, case insensitive matching on non-ascii chars would require encoding knowledge -- but it doesn't handle that.) I've used it on Unicode files without problems, but if you have issues with encodings -- or ideas/PRs to improve it in general -- do let me know.
And thanks for the kind words -- glad it's useful!
Firstly, many thanks for putting this up - I think it's brilliant. In addition to code refactoring this is tremendously useful for people editing and revising books (with LaTeX, markdown and/or reStructured Text sources). For this purpose it would be very helpful to have
repren
deal also with non-ascii characters (e.g. accented characters in foreign words).Would you consider adding an
--encoding
option to enable users to specify file encoding?repren
could then decode the inputs read from pattern and input files to unicode, do all the internal processing in unicode and then encode again when writing output.The text was updated successfully, but these errors were encountered: