From: Steve Hancock Date: Mon, 23 Mar 2020 22:33:36 +0000 (-0700) Subject: update CHANGES to note change in default encoding X-Git-Tag: 20200619~119 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1af3ae73152217b67c3e3f38f5e0d57656e97455;p=perltidy.git update CHANGES to note change in default encoding --- diff --git a/CHANGES.md b/CHANGES.md index f411d7cc..798671dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,13 @@ latin-1. Also, specific encodings of input files other than utf8 may now be given, for example --character-encoding=euc-jp. + The default encoding has been set to be 'guess' instead of 'none'. I + do not like to change defaults, but this seems like the best + default choice, since it should make perltidy + work properly with both older latin-1 and newer utf8 files. I have done + extensive testing and haven't found any problems, but I will open + an issue at git for comments in case this causes problems. + - Fix for git#22, Preserve function signature on a single line. An unwanted line break was being introduced when a closing signature paren followed a closing do brace. diff --git a/bin/perltidy b/bin/perltidy index 9c69542f..b11bf2b9 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -590,8 +590,8 @@ this flag is in effect. This flag indicates the character encoding, if any, of the input data stream. Perltidy does not look for the encoding directives in the soure stream, such as B, and instead relies on this flag to determine the encoding. -(It has to be this way because perltidy is often working on snippets of code -rather than a complete file). +(Note that perltidy often works on snippets of code rather than complete files +so it cannot rely on B directives). The possible values for B are (1) the name of an encoding recognized by the Encode.pm module, (2) B if no encoding is used, or (3) if