Sent from my iPhone > On 17 Aug 2018, at 17:15, Ingo Schwarze <schwarze@xxxxxxx> wrote: > > Hi Darren, > > Darren Tucker wrote on Fri, Aug 17, 2018 at 07:16:03AM -0700: >> On 13 August 2018 at 15:06, Val Baranov <val.baranov@xxxxxxxx> wrote: > >>> test_utf8: ........................ >>> regress/unittests/utf8/tests.c:48 test #25 "c_esc" >>> ASSERT_INT_EQ(len, wantlen) failed: >>> len = -1 >>> wantlen = 5 > >> This boils down to meaning OpenSSH's smnprintf call failed for the >> string "\033x" instead of returning the expected escaped version >> "\\033x". The code is in utf8.c but I am not sure why it failed. > > Actually, it is *supposed* to fail unless the locale is either > UTF-8 or the POSIX (ASCII) locale, because '\033' is not a > printable character and attempting to escape invalid stuff > is unsafe in arbitrary locales. > >> What's your locale set to? > Irrc the default on AIX. is iso-18559-15 (hope i have all the numbers right. In any case not utf-8. AIX 7.2 may be different. In any case on AIX 6.1 the test logic automatically sets utf8 test to no. > It doesn't matter on OpenBSD, but maybe you should consider setting > LC_CTYPE=en_US.UTF-8 by default in TEST_ENV in the portable version > of the test suite? Of course, it would do no harm on OpenBSD either. > > If you worry that some target system might not have a en_US.UTF-8 > locale installed, you can look at > > http://mandoc.bsd.lv/cgi-bin/cvsweb/configure?rev=HEAD > > for a way to autodetect a suitable UTF-8 locale - look for UTF8_LOCALE > in that script. > > But that may be overkill for OpenSSH. Just recklessly forcing > LC_CTYPE=en_US.UTF-8 may be good enough for OpenSSH's purposes. > If the target system doesn't provide it, setlocale(3) will fall > back to POSIX, which should be good enough for the tests. > > Yours, > Ingo > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev@xxxxxxxxxxx > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev