On Mon, Jun 9, 2025 at 2:33 PM Jun Omae <jun6...@gmail.com> wrote:
>
> Hi,
>
> On 2025/06/07 5: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
> >
> > ---
> >
> > * running on x86_64-unknown-linux-gnu
> >   - "Debian GNU/Linux 12 (bookworm)" [Linux 
> > 6.6.87.1-microsoft-standard-WSL2]
> >   - locale encoding: UTF-8
> >
> > ---
> >
> > * running on x86_64-unknown-linux-gnu
> >   - "Debian GNU/Linux 12 (bookworm)" [Linux 
> > 6.6.87.1-microsoft-standard-WSL2]
> >   - locale encoding: ISO-8859-15
> >
> > - I didn't yet find a good way to display this part: *en_US*.UTF-8 of 
> > locale info, but I think it's not mandatory for us. So it's fine.
>
> I think we could retrieve the *.po headers from `dgettext()` which
> passed an empty string and show the language of the message catalog by
> extracting "Language: ..." from the headers.
>
> See attached patch.

Looks good to me.

Minor notice: I think it's better to return NULL from
svn_sysinfo__message_language(), but handle "(compiled without NLS
supports)" when preparing version info, like we do for the other
properties. Also maybe it would be better to completely hide "message
language" if NLS is not enabled.

-- 
Timofei Zhakov

Reply via email to