svn commit: r1934506 - in subversion/branches/1.15.x: . subversion/include/private subversion/libsvn_subr

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <177947057656.2131996.11099994815935383375@svn03-he-fi>
Author: brane
Date: Fri May 22 17:22:56 2026
New Revision: 1934506

Log:
* branches/1.15.x/STATUS: +0 for r1934466 and the r1934437 group.

Modified:
   subversion/branches/1.15.x/   (props changed)
   subversion/branches/1.15.x/STATUS
   subversion/branches/1.15.x/subversion/include/private/svn_utf_private.h
   subversion/branches/1.15.x/subversion/libsvn_subr/sysinfo.c
   subversion/branches/1.15.x/subversion/libsvn_subr/utf.c
   subversion/branches/1.15.x/subversion/libsvn_subr/win32_xlate.c
   subversion/branches/1.15.x/subversion/libsvn_subr/win32_xlate.h

Modified: subversion/branches/1.15.x/STATUS
==============================================================================
--- subversion/branches/1.15.x/STATUS	Fri May 22 17:17:47 2026	(r1934505)
+++ subversion/branches/1.15.x/STATUS	Fri May 22 17:22:56 2026	(r1934506)
@@ -46,6 +46,7 @@ Candidate changes:
      Fix vcxproj build with zlib 1.3.2+ on Windows.
    Votes:
      +1: jun66j5
+     +0: brane (review only, can't test)
 
  * r1934437, r1934438, r1934443, r1934444
    Make `svn --version -v` report actual character encoding used on Windows.
@@ -59,6 +60,7 @@ Candidate changes:
        support" option is used on Windows.
    Votes:
      +1: ivan
+     +0: brane (review only, can't test)
 
  * r1934497, r1934500
    Make test work without the 'venv' Python module.

Modified: subversion/branches/1.15.x/subversion/include/private/svn_utf_private.h
==============================================================================
--- subversion/branches/1.15.x/subversion/include/private/svn_utf_private.h	Fri May 22 17:17:47 2026	(r1934505)
+++ subversion/branches/1.15.x/subversion/include/private/svn_utf_private.h	Fri May 22 17:22:56 2026	(r1934506)
@@ -93,6 +93,10 @@ svn_utf__cstring_from_utf8_fuzzy(const c
                                                const char *,
                                                apr_pool_t *));
 
+/* Get the actual name of the character that will be used when
+ * SVN_APR_LOCALE_CHARSET is provided.
+ * Allocate result in POOL. */
+const char *svn_utf__locale_encoding(apr_pool_t *pool);
 
 #if defined(WIN32)
 /* On Windows: Convert the UTF-8 string SRC to UTF-16.

Modified: subversion/branches/1.15.x/subversion/libsvn_subr/sysinfo.c
==============================================================================
--- subversion/branches/1.15.x/subversion/libsvn_subr/sysinfo.c	Fri May 22 17:17:47 2026	(r1934505)
+++ subversion/branches/1.15.x/subversion/libsvn_subr/sysinfo.c	Fri May 22 17:22:56 2026	(r1934506)
@@ -35,7 +35,6 @@
 #include <apr_thread_proc.h>
 #include <apr_version.h>
 #include <apu_version.h>
-#include <apr_portable.h>       /* for apr_os_locale_encoding() */
 
 #include "svn_pools.h"
 #include "svn_ctype.h"
@@ -141,62 +140,78 @@ svn_sysinfo__release_name(apr_pool_t *po
 const char *
 svn_sysinfo__character_encoding(apr_pool_t *pool)
 {
-  return apr_os_locale_encoding(pool);
+  return svn_utf__locale_encoding(pool);
 }
 
 const apr_array_header_t *
 svn_sysinfo__linked_libs(apr_pool_t *pool)
 {
-  svn_version_ext_linked_lib_t *lib;
-  apr_array_header_t *array = apr_array_make(pool, 7, sizeof(*lib));
-  int lz4_version = svn_lz4__runtime_version();
-
-  lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
-  lib->name = "APR";
-  lib->compiled_version = APR_VERSION_STRING;
-  lib->runtime_version = apr_pstrdup(pool, apr_version_string());
+  apr_array_header_t *array =
+      apr_array_make(pool, 7, sizeof(svn_version_ext_linked_lib_t));
+
+  {
+    svn_version_ext_linked_lib_t *lib = apr_array_push(array);
+    lib->name = "APR";
+    lib->compiled_version = APR_VERSION_STRING;
+    lib->runtime_version = apr_pstrdup(pool, apr_version_string());
+  }
 
 /* Don't list APR-Util if it isn't linked in, which it may not be if
  * we're using APR 2.x+ which combined APR-Util into APR. */
 #ifdef APU_VERSION_STRING
-  lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
-  lib->name = "APR-Util";
-  lib->compiled_version = APU_VERSION_STRING;
-  lib->runtime_version = apr_pstrdup(pool, apu_version_string());
-#endif
-
-  lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
-  lib->name = "Expat";
-  lib->compiled_version = apr_pstrdup(pool, svn_xml__compiled_version());
-  lib->runtime_version = apr_pstrdup(pool, svn_xml__runtime_version());
-
-  lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
-  lib->name = "SQLite";
-  lib->compiled_version = apr_pstrdup(pool, svn_sqlite__compiled_version());
+  {
+    svn_version_ext_linked_lib_t *lib = apr_array_push(array);
+    lib->name = "APR-Util";
+    lib->compiled_version = APU_VERSION_STRING;
+    lib->runtime_version = apr_pstrdup(pool, apu_version_string());
+  }
+#endif
+
+  {
+    svn_version_ext_linked_lib_t *lib = apr_array_push(array);
+    lib->name = "Expat";
+    lib->compiled_version = apr_pstrdup(pool, svn_xml__compiled_version());
+    lib->runtime_version = apr_pstrdup(pool, svn_xml__runtime_version());
+  }
+
+  {
+    svn_version_ext_linked_lib_t *lib = apr_array_push(array);
+    lib->name = "SQLite";
+    lib->compiled_version = apr_pstrdup(pool, svn_sqlite__compiled_version());
 #ifdef SVN_SQLITE_INLINE
-  lib->runtime_version = NULL;
+    lib->runtime_version = NULL;
 #else
-  lib->runtime_version = apr_pstrdup(pool, svn_sqlite__runtime_version());
+    lib->runtime_version = apr_pstrdup(pool, svn_sqlite__runtime_version());
 #endif
+  }
 
-  lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
-  lib->name = "Utf8proc";
-  lib->compiled_version = apr_pstrdup(pool, svn_utf__utf8proc_compiled_version());
-  lib->runtime_version = apr_pstrdup(pool, svn_utf__utf8proc_runtime_version());
-
-  lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
-  lib->name = "ZLib";
-  lib->compiled_version = apr_pstrdup(pool, svn_zlib__compiled_version());
-  lib->runtime_version = apr_pstrdup(pool, svn_zlib__runtime_version());
-
-  lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
-  lib->name = "LZ4";
-  lib->compiled_version = apr_pstrdup(pool, svn_lz4__compiled_version());
-
-  lib->runtime_version = apr_psprintf(pool, "%d.%d.%d",
-                                      lz4_version / 100 / 100,
-                                      (lz4_version / 100) % 100,
-                                      lz4_version % 100);
+  {
+    svn_version_ext_linked_lib_t *lib = apr_array_push(array);
+    lib->name = "Utf8proc";
+    lib->compiled_version =
+        apr_pstrdup(pool, svn_utf__utf8proc_compiled_version());
+    lib->runtime_version =
+        apr_pstrdup(pool, svn_utf__utf8proc_runtime_version());
+  }
+
+  {
+    svn_version_ext_linked_lib_t *lib = apr_array_push(array);
+    lib->name = "ZLib";
+    lib->compiled_version = apr_pstrdup(pool, svn_zlib__compiled_version());
+    lib->runtime_version = apr_pstrdup(pool, svn_zlib__runtime_version());
+  }
+
+  {
+    svn_version_ext_linked_lib_t *lib = apr_array_push(array);
+    int lz4_version = svn_lz4__runtime_version();
+    lib->name = "LZ4";
+    lib->compiled_version = apr_pstrdup(pool, svn_lz4__compiled_version());
+
+    lib->runtime_version = apr_psprintf(pool, "%d.%d.%d",
+                                        lz4_version / 100 / 100,
+                                        (lz4_version / 100) % 100,
+                                        lz4_version % 100);
+  }
 
   return array;
 }

Modified: subversion/branches/1.15.x/subversion/libsvn_subr/utf.c
==============================================================================
--- subversion/branches/1.15.x/subversion/libsvn_subr/utf.c	Fri May 22 17:17:47 2026	(r1934505)
+++ subversion/branches/1.15.x/subversion/libsvn_subr/utf.c	Fri May 22 17:22:56 2026	(r1934506)
@@ -31,6 +31,7 @@
 #include <apr_lib.h>
 #include <apr_xlate.h>
 #include <apr_atomic.h>
+#include <apr_portable.h>       /* for apr_os_locale_encoding() */
 
 #include "svn_hash.h"
 #include "svn_string.h"
@@ -1194,6 +1195,16 @@ svn_utf__utf32_to_utf8(const svn_string_
   return SVN_NO_ERROR;
 }
 
+const char *
+svn_utf__locale_encoding(apr_pool_t *pool)
+{
+#if defined(WIN32)
+  /* We have special code for xlate on Windows. */
+  return svn_subr__win32_xlate_locale_encoding(pool);
+#else
+  return apr_os_locale_encoding(pool);
+#endif
+}
 
 #ifdef WIN32
 

Modified: subversion/branches/1.15.x/subversion/libsvn_subr/win32_xlate.c
==============================================================================
--- subversion/branches/1.15.x/subversion/libsvn_subr/win32_xlate.c	Fri May 22 17:17:47 2026	(r1934505)
+++ subversion/branches/1.15.x/subversion/libsvn_subr/win32_xlate.c	Fri May 22 17:22:56 2026	(r1934506)
@@ -248,6 +248,31 @@ svn_subr__win32_xlate_to_stringbuf(svn_s
   return APR_SUCCESS;
 }
 
+const char *
+svn_subr__win32_xlate_locale_encoding(apr_pool_t *pool)
+{
+  CPINFOEXW cpinfo = { 0 };
+
+  if (GetCPInfoExW(CP_THREAD_ACP, 0, &cpinfo))
+    {
+      DWORD codepage = cpinfo.CodePage;
+      if (codepage == CP_UTF8)
+        {
+          return "UTF-8";
+        }
+      else
+        {
+          return apr_psprintf(pool, "CP%u", (unsigned int)cpinfo.CodePage);
+        }
+    }
+  else
+    {
+      /* Fallback to apr_os_default_encoding() like
+       * apr_os_locale_encoding(). */
+      return apr_os_default_encoding(pool);
+    }
+}
+
 #else  /* !WIN32 */
 
 /* Silence OSX ranlib warnings about object files with no symbols. */

Modified: subversion/branches/1.15.x/subversion/libsvn_subr/win32_xlate.h
==============================================================================
--- subversion/branches/1.15.x/subversion/libsvn_subr/win32_xlate.h	Fri May 22 17:17:47 2026	(r1934505)
+++ subversion/branches/1.15.x/subversion/libsvn_subr/win32_xlate.h	Fri May 22 17:22:56 2026	(r1934506)
@@ -49,6 +49,9 @@ svn_subr__win32_xlate_to_stringbuf(svn_s
                                    svn_stringbuf_t **dest,
                                    apr_pool_t *pool);
 
+/* Windows specific implementation of svn_utf__locale_encoding(). */
+const char *svn_subr__win32_xlate_locale_encoding(apr_pool_t *pool);
+
 #endif /* WIN32 */
 
 #endif /* SVN_LIBSVN_SUBR_WIN32_XLATE_H */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.