fails without mbstring

Bug #734494 reported by Michal Čihař
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
php-gettext
Fix Committed
High
Данило Шеган

Bug Description

(Forwarded from https://sourceforge.net/tracker/index.php?func=detail&aid=3206933&group_id=23067&atid=377410)

When php is compiled without mbstring, php-gettext completely fails to work. I think it would be great if still worked for simple (and probably most common) case where everything is utf-8.

Related branches

Changed in php-gettext:
status: New → Fix Committed
assignee: nobody → Данило Шеган (danilo)
importance: Undecided → High
Revision history for this message
Данило Шеган (danilo) wrote :

Hi, thanks for the report. I've committed a fix similar to what was proposed on a bug on SF. It's in r60 of lp:php-gettext, and depending on how much you need it in a release, I can roll one out later today.

To fix encoding stuff properly, it'd probably take a bit more effort. However, proposed patch on SF was just passing the text through, so I did that in my version as well. I didn't want to define such stubs since that might conflict with something else expecting those functions (and php-gettext is a library and is commonly combined with other code).
Thus, I just wrapped the call with function_exists stuff.

Let me know how it works.

Also, can you please check if "ini_get('mbstring.internal_encoding')" returns anything when PHP is compiled with no mbstring support? (this is used in _get_codeset() when PO/MO file has no charset defined).

Revision history for this message
Michal Čihař (nijel) wrote :

I don't have such version, but I've forwarded the question to original reporter.

Revision history for this message
Akash Sinha (sinha) wrote :

when PHP is compiled with no mbstring support, " ini_get('mbstring.internal_encoding')" method returns an empty string.

Revision history for this message
Данило Шеган (danilo) wrote :

Thanks for the input, I'll make it use UTF-8 in that case then.

Revision history for this message
ryanhowdy (haudenschilt) wrote :

I'm experiencing a similar issue but the revision 60 didn't seem to fix it.

I have mbstring support enabled, but "ini_get('mbstring.internal_encoding')" is still returning and empty string.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.