On 2026/05/15 0:28, Timofei Zhakov wrote:
> There is a test called basic_tests.py:argv_with_best_fit_chars. It
> checks that svn rejects Unicode symbols. Functionality which was
> illegal before changes introduced in that branch.
In the branch, svn command receives the arguments as utf-8 bytes, but the
output of the pipe is applied best-fit encoding conversion.

[[[
diff --git a/subversion/tests/cmdline/basic_tests.py 
b/subversion/tests/cmdline/basic_tests.py
index 88f43bfae7..edb697b795 100755
--- a/subversion/tests/cmdline/basic_tests.py
+++ b/subversion/tests/cmdline/basic_tests.py
@@ -3357,20 +3357,22 @@ def argv_with_best_fit_chars(sbox):
       yield chr(c), mbcs
 
   count = 0
-  # E721113: Conversion from UTF-16 failed: No mapping for the Unicode
-  # character exists in the target multi-byte code page.
-  expected_stderr = 'svn: E721113: '
+  # The argument is received as utf-8 bytes, but the output to the pipe
+  # is applied best-fit encoding conversion.
   for wc, mbcs in iter_bestfit_chars():
     count += 1
     logger.info('Code page %r - U+%04x -> 0x%s', codepage, ord(wc), mbcs.hex())
     if mbcs == b'"':
-      svntest.actions.run_and_verify_svn2(None, expected_stderr, 1, 'help',
+      expected_stderr = r'^"foo" "bar": unknown command'
+      svntest.actions.run_and_verify_svn2(None, expected_stderr, 0, 'help',
                                           'foo{0} {0}bar'.format(wc))
     elif mbcs == b'\\':
-      svntest.actions.run_and_verify_svn2(None, expected_stderr, 1, 'help',
+      expected_stderr = r'^"foo\\" \\"bar": unknown command'
+      svntest.actions.run_and_verify_svn2(None, expected_stderr, 0, 'help',
                                           'foo{0}" {0}"bar'.format(wc))
     elif mbcs == b' ':
-      svntest.actions.run_and_verify_svn2(None, expected_stderr, 1, 'help',
+      expected_stderr = r'^"foo bar": unknown command'
+      svntest.actions.run_and_verify_svn2(None, expected_stderr, 0, 'help',
                                           'foo{0}bar'.format(wc))
   if count == 0:
     raise svntest.Skip('No best fit characters in code page %r' % codepage)
]]]


Recently, I'm trying 1.14.x with utf-8 code page using activeCodePage
manifest [1]. It almost works fine (e.g. add emoji filenames and checkout,
...) however output to stderr is garbled and not fixed yet.

[1] 
https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page

-- 
Jun Omae <[email protected]> (大前 潤)

Reply via email to