[dev] Question marks and problems with gettext reencoding...
Romans Malinovskis
romans@void.lv
Mon, 19 Nov 2001 14:46:06 +0200
-- Monday, November 19, 2001 -- 2:19:57 PM -- Jan Schneider ----------------
>> -- Monday, November 19, 2001 -- 11:01:55 AM -- Jan Schneider
>> ----------------
>> >> Just spent half a night trying to find out why gettext is
>> printing
>> >> out question marks instead of
>> >> russian / latvian characters... The problem was because of probably
>> >> broken glibc i18n support.
>> >>
>> >>
>> >> in a shell, environment variable OUTPUT_CHARSET specify which
>> charset
>> >> terminal is capable of, but
>> >> latest stable PHP does not have any way to chane this one on the fly
>> >> (development snapshot does have
>> >> this patch applied on 8 nov 2001)
>> >>
>> >> here is a patch for function bind_textdomain_codeset which allows to
>> >> change output codeset.
>> >>
>> >> http://www.zend.com/lists/php-dev/200111/msg00402.html
>> >>
>> >>
>> >> you can use
>> >> bind_textdomain_codeset('imp',$nls['charsets'][$language]);
>> >> to change output codeset for imp.
>>
>> > Did you also try if setting OUTPUT_CHARSET from within php [setenv()]
>> does
>> > work?
>>
>> i tried..
>> no, it doesn't.
>> however it works if defined before apache/php is run...
> OK, I changed the code so that bind_textdomain_charset() is called if it is
> available in the current php installation. Can you update and try if it
> works?
not yet, but my own modified code works very funny... it randomly changes charset sometimes...
sometimes it change it in the middle of the page.. could this be because of multiple paralel httpd
processes?
i'll upgrade, check and report if this helps.
romans