Hi Zeev,

Zeev Suraski wrote:

On 18 בפבר׳ 2016, at 21:58, Andrea Faulds <a...@ajf.me> wrote:


Hmm. Well, if we're doing mass deprecations, maybe we should finally get rid of 
hebrev() and hebrevc()? It feels out-of-place to have a poorly-documented 
standard library function specifically for converting between two different 
legacy 8-bit encodings used for Hebrew, especially when one of them is just the 
other with nl2br() included! Users who need to convert between different 
variants of ISO-8859-8 can use iconv() instead, or perhaps use a userland 
polyfill of hebrev/c().

I'm not aware that you can use iconv to convert visual to logical Hebrew or 
vice versa.  Not saying you can't, just that I'm not aware it does - I don't 
think it support visual encodings at all.  Do you know how to convert between 
them using iconv?  If you do, I'm fine reimplementing these functions using 
iconv, again, if we can eliminate the pointless upgrade hassle.  The other 
alternative of a userland version isn't that simple to write, would be slower, 
and most importantly buys us nothing.

Looking into it, iconv() doesn't seem to support converting between ISO-8859-8 and ISO-8859-8-I, at least on my system. Nor can mb_convert_encoding(). Both only support ISO-8859-8.

I should have researched this before. hebrev() isn't redundant, then, sorry about that.

I'm guessing that hebrevc() predates nl2br() (could be wrong), but regardless, 
I wouldn't touch it as there's zero gain to be had.

Ah, that might explain the difference.

Last - we're not or at least shouldn't be doing mass deprecations.  There 
should be an extremely strong reason to break perfectly good code.

Yeah, I'd be cautious about removing any of these. I do think these functions should be moved in the manual (and possibly source), though.

Thanks for your input.
--
Andrea Faulds
https://ajf.me/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to