Yii Framework Forum: Yii does not understand cyrillic GET parameters - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii does not understand cyrillic GET parameters Yii 1.1 Rate Topic: -----

#1 User is offline   bettor 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 747
  • Joined: 02-February 09

Posted 18 January 2010 - 10:10 AM

Hi all,

Has anybody experienced issues with cyrillic characters in the url. I would like to call my about page as:
index.php?r=site/page&view=занас //занас = about


Yii does not understand the value of the view parameter. I can confirm that I have also renamed my view file with its respective cyrillic name to comply with the naming convention but still no positive effect.

Has anybody discovered a work around this issue? Please share.

Cheers,
b
0

#2 User is offline   bettor 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 747
  • Joined: 02-February 09

Posted 18 January 2010 - 10:23 AM

UPDATE:

I looked at the CViewAction and found where the issue lies. The problem is in the regex that resolvles the view value into a valid view action call:

protected function resolveView($viewPath)
	{
		// start with a word char and have word chars, dots and dashes only
		if(preg_match('/^\w[\w\.\-]*$/',$viewPath))


The regexp searches for latin letters only. If I am not mistaking I will have to override this method and apply custom regex that searches for cyrillic letters. I think this should be fixed on core level to somehow pass a custom regex. If anybody has any idea on how to apply a cyrillic regex please post it here.

Cheers,
b
0

#3 User is offline   ayanamist 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 17-February 09

Posted 19 January 2010 - 12:57 AM

i think you should use latin words in your url rather than other language words.
not all browsers can support this kind of url.
perhaps you can escape this url
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users