Using the multi-byte parameter of request_var() with arrays

Discussion forum for MOD Writers regarding MOD Development.
Locked
nanothree
Registered User
Posts: 262
Joined: Wed Dec 10, 2003 8:33 am
Location: Doncaster, UK
Contact:

Using the multi-byte parameter of request_var() with arrays

Post by nanothree » Fri Dec 14, 2007 4:58 pm

I have used this code below to try and get arabic chars to show properly with my input but it's not working. Can anyone tell me why?

Code: Select all

            $tag = request_var('tag_id', array(0 => array('' => '')), true);
            foreach($tag as $topic_id => $tags)
            {
                foreach($tags as $tag_text => $null)
                {
                    $tag_text = utf8_normalize_nfc($tag_text);
                    echo $tag_text . '<br />';
                    $this->remove_tag($tag_text, $topic_id);
                }
            }
  
But this still outputs ?????? instead of arabic chars.

Anyone any ideas?

Thanks!

nader_genko
Registered User
Posts: 13
Joined: Mon Apr 28, 2008 9:25 pm

Re: Using the multi-byte parameter of request_var() with arrays

Post by nader_genko » Thu Sep 17, 2009 9:57 am

i have the same problem :(

any help please.

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Using the multi-byte parameter of request_var() with arrays

Post by igorw » Thu Sep 17, 2009 4:53 pm

Could you give the following a try please.

OPEN: includes/functions.php

FIND:

Code: Select all

set_var($_k, $_k, $sub_key_type);
REPLACE WITH:

Code: Select all

set_var($_k, $_k, $sub_key_type, $multibyte);
Let me know if that fixes anything.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

nader_genko
Registered User
Posts: 13
Joined: Mon Apr 28, 2008 9:25 pm

Re: Using the multi-byte parameter of request_var() with arrays

Post by nader_genko » Fri Sep 18, 2009 5:04 am

i used request_var like below and every thing work fine now :)

$title = utf8_normalize_nfc(request_var('title' , ' ', true));

Thanks for replay

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Using the multi-byte parameter of request_var() with arrays

Post by igorw » Fri Sep 18, 2009 3:34 pm

In that case it's a bug. I've submitted a ticket for it: http://www.phpbb.com/bugs/phpbb3/ticket ... t_id=51555
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

Locked

Return to “[3.0.x] MOD Writers Discussion”