Author: rinrab
Date: Tue May 27 21:07:38 2025
New Revision: 1925876
URL: http://svn.apache.org/viewvc?rev=1925876&view=rev
Log:
On the 'utf8-cmdline-prototype' branch: Implement
svn_opt_args_to_target_array3()
through svn_opt__process_target_array() and convert args manually, instead of
relying on svn_opt__args_to_target().
* subversion/libsvn_subr/deprecated.c
(svn_opt_args_to_target_array3): Ditto.
Modified:
subversion/branches/utf8-cmdline-prototype/subversion/libsvn_subr/deprecated.c
Modified:
subversion/branches/utf8-cmdline-prototype/subversion/libsvn_subr/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/branches/utf8-cmdline-prototype/subversion/libsvn_subr/deprecated.c?rev=1925876&r1=1925875&r2=1925876&view=diff
==============================================================================
---
subversion/branches/utf8-cmdline-prototype/subversion/libsvn_subr/deprecated.c
(original)
+++
subversion/branches/utf8-cmdline-prototype/subversion/libsvn_subr/deprecated.c
Tue May 27 21:07:38 2025
@@ -814,7 +814,21 @@ svn_opt_args_to_target_array3(apr_array_
const apr_array_header_t *known_targets,
apr_pool_t *pool)
{
- return svn_error_trace(svn_opt__args_to_target_array(targets_p, os,
+ apr_array_header_t *utf8_input_targets =
+ apr_array_make(pool, os->argc - os->ind, sizeof(const char *));
+
+ for (; os->ind < os->argc; os->ind++)
+ {
+ /* The apr_getopt targets are still in native encoding. */
+ const char *raw_target = os->argv[os->ind];
+ const char *utf8_target;
+
+ SVN_ERR(svn_utf_cstring_to_utf8(&utf8_target, raw_target, pool));
+
+ APR_ARRAY_PUSH(utf8_input_targets, const char *) = utf8_target;
+ }
+
+ return svn_error_trace(svn_opt__process_target_array(targets_p, os,
known_targets, pool));
}