Re: [PATCH] Use FIX_UTF8_MAC to enable conversion from UTF8-MAC to UTF8

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Junio C Hamano <gitster@...>, Mark Junker <mjscod@...>, <git@...>
Date: Tuesday, January 22, 2008 - 7:57 am

On Mon, Jan 21, 2008 at 08:59:56PM -0800, Linus Torvalds wrote:

Yes, starting with Mac OS X 10.2 there are functions for that.
http://developer.apple.com/qa/qa2001/qa1235.html

Anyway, even if iconv is to be used, I believe it should be possible to
avoid malloc here (I usually allocate 256 on stack and use malloc()/free()
only when I need more than that which in practice never happens!). It is
also avoidable to call iconv_open/iconv_close for each name by putting the
allocated descriptor for character set conversion into a static variable.
Thus leaving iconv() alone, which should not be big overhead provided that
it is done only for non-ASCII names.

Dmitry
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Use FIX_UTF8_MAC to enable conversion from UTF8-..., Johannes Schindelin, (Mon Jan 21, 7:24 am)
Re: [PATCH] Use FIX_UTF8_MAC to enable conversion from UTF8-..., Johannes Schindelin, (Mon Jan 21, 8:09 am)
Re: [PATCH] Use FIX_UTF8_MAC to enable conversion from UTF8-..., Johannes Schindelin, (Mon Jan 21, 3:14 pm)
Re: [PATCH] Use FIX_UTF8_MAC to enable conversion from UTF8-..., Dmitry Potapov, (Tue Jan 22, 7:57 am)