Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-30-2008, 11:51 PM
Junior Member
 
Join Date: Mar 2008
Posts: 1
Question Zend_Filter_Alpha issues

Hi!
I am trying to filter the input from a form using Zend_Filter_Alpha. The problem is that it removes valid swedish characters like å,ä and ö. I have checked the code and it seems like the filter is using the following regexp:

Code:
        } else if (extension_loaded('mbstring')) {
            // Unicode safe filter for the value with mbstring
            $pattern = '/[^[:alpha:]' . $whiteSpace . ']/u';
I have tried with changing the settings form mbstring.http_input and mbstring.http_output as well as making sure that the correct locale is set and if that might have some effect but i still have the same problem.

On this page you can see the form with a default value that uses swedish characters.

The mbstring settings are:

Code:
Multibyte Support = enabled 
Multibyte string engine = libmbfl 
Multibyte (japanese) regex support = enabled 
Multibyte regex (oniguruma) version = 4.4.4 
Multibyte regex (oniguruma) backtrack check = On 
 
mbstring.detect_order = no value 
mbstring.encoding_translation = Off 
mbstring.func_overload = 0 
mbstring.http_input = UTF-8 
mbstring.http_output = UTF-8 
mbstring.internal_encoding = UTF-8 
mbstring.language = neutral 
mbstring.strict_detection = Off 
mbstring.substitute_character = no value
Still it removes all characters that is outside the range of a-zA-Z, is it supposed to be that way or am I doing something wrong?

Last edited by Myllykoski Design : 03-31-2008 at 12:23 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-06-2008, 09:14 PM
Junior Member
 
Join Date: Apr 2008
Posts: 1
Default The same mbstring issue for me

Hello,

I have exactly the same issue! I'm from Poland, in my case Polish letters are filtered not properly and also Zend_Validate_Alpha is not working for me (because it's using Zend_Filter_Alpha ;-) ).

I've tried to set locale into 'pl_PL' by doing: set_locale(LC_ALL, 'pl_PL'), but this still doesn't work.

Any ideas? I just can't unload mbstring extension because it's compiled into PHP :/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:36 AM.