On Sun, Jun 8, 2025 at 4:08 AM Branko Čibej <br...@apache.org> wrote:
> On 6. 6. 25 22:16, Timofei Zhakov wrote: > > Hi, > > I would like to suggest adding a line to svn --version command to display > the current locale name. > > This could be helpful for us receiving or investigating any > encoding-related bugs, and seems generally useful to a part of platform > information. > > So, I decided to draft a patch (attached to the email) to implement this > feature. Providing examples of the machine info section of the new svn > --version --verbose command below: > > * running on x86_64-microsoft-windows6.2.9200 > - Windows 10 Pro, build 26100 [6.3 Client Multiprocessor Free] > - locale encoding: CP1252 > > > > I'd call it "character encoding", it's more precise. "Locale encoding" > means how the locale is encoded, which isn't what's shown here. Similarly, > the struct members and accessors and public functions should be renamed. > > I agree. I wasn't initially sure about that. Maybe "character set" would be even better? > > Index: subversion/libsvn_subr/opt_subcommand.c > =================================================================== > --- subversion/libsvn_subr/opt_subcommand.c (revision 1926036) > +++ subversion/libsvn_subr/opt_subcommand.c (working copy) > @@ -29,6 +29,7 @@ > > #include <assert.h> > #include <apr_general.h> > +#include <apr_portable.h> > > #include "svn_hash.h" > #include "svn_cmdline.h" > @@ -491,6 +492,9 @@ > svn_version_ext_runtime_osname(info))); > } > > + SVN_ERR(svn_cmdline_printf(pool, _(" - locale encoding: %s\n"), > + svn_version_ext_locale_encoding(info))); > + > libs = svn_version_ext_linked_libs(info); > if (libs && libs->nelts) > { > > You don't need <apr_portable.h> here. > Oh, I see. Thanks for reviewing! -- Timofei Zhakov