Re: [PATCH] macos: lazily initialize iconv
- From
Ralf Thielow <ralf.thielow@gmail.com>
- Date
- Jul 31, 2012, 18:10 UTC
- Message-ID
- <CAN0XMOL6m0B0bLwdp9mviOLqYORGcnf9LMS5=+WkXhGinBrzgA@mail.gmail.com>
- In-Reply-To
- <7vk3xjked0.fsf@alter.siamese.dyndns.org>
On Tue, Jul 31, 2012 at 7:52 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> + /* Avoid iconv_open()/iconv_close() if there is nothing to convert */
> + for (i = 0; i < argc; i++) {
> + if (has_utf8(argv[i], (size_t)-1, NULL))
> + break;
> + }
> + if (i < argc)
> + return;
> +I'm not very familiar with this code but:
before: it reencodes everything which is utf-8 in argv after: it reencodes *nothing* if one string in argv is not in utf-8
am i wrong?