Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3 Add interface to set UTF-16LE alias.

open
nobody
5
2005-02-14
2005-02-14
Anonymous
No

I'v run into some kind of conflict with old iconv
implementations.

My hosting provider uses glibc 2.1.3. and that thing
doesn't know what is "UTF-16LE", but started to work
fine when I've changed string:
$result = iconv('UTF-16LE', $this->_defaultEncoding,
$string);
into:
$result = iconv('UNICODELITTLE',
$this->_defaultEncoding, $string);

I know that 'UTF-16LE' is a standard compliant name,
but I believe that different implementations of iconv
may have such kind of troubles. It would be nice if you
add some kind of interface to set "from"-encoding name.
Something like this:

function setUtfAlias($str) {
$this->_UTFAlias = $str;
}

...
$result = iconv($this->_UTFAlias,
$this->_defaultEncoding, $string)
...

--
Filthy_Pervert[BDSM] // dmitry2029@tochka.ru

Discussion