Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 45269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:46:57+00:00 2026-05-10T15:46:57+00:00

Today I stumbled about a Problem which seems to be a bug in the

  • 0

Today I stumbled about a Problem which seems to be a bug in the Zend-Framework. Given the following route:

<test>     <route>citytest/:city</route>     <defaults>         <controller>result</controller>         <action>test</action>     </defaults>     <reqs>         <city>.+</city>     </reqs> </test> 

and three Urls:

  • mysite.local/citytest/Berlin
  • mysite.local/citytest/Hamburg
  • mysite.local/citytest/M%FCnchen

the last Url does not match and thus the correct controller is not called. Anybody got a clue why?

Fyi, where are using Zend-Framework 1.0 ( Yeah, I know that’s ancient but I am not in charge to change that :-/ )

Edit: From what I hear, we are going to upgrade to Zend 1.5.6 soon, but I don’t know when, so a Patch would be great.

Edit: I’ve tracked it down to the following line (Zend/Controller/Router/Route.php:170):

$regex = $this->_regexDelimiter . '^' .    $part['regex'] . '$' .    $this->_regexDelimiter . 'iu'; 

If I change that to

  $this->_regexDelimiter . 'i'; 

it works. From what I understand, the u-modifier is for working with asian characters. As I don’t use them, I’m fine with that patch for know. Thanks for reading.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:46:57+00:00Added an answer on May 10, 2026 at 3:46 pm

    The problem is the following:

    Using the /u pattern modifier prevents words from being mangled but instead PCRE skips strings of characters with code values greater than 127. Therefore, \w will not match a multibyte (non-lower ascii) word at all (but also won’t return portions of it). From the pcrepattern man page;

    In UTF-8 mode, characters with values greater than 128 never match \d, \s, or \w, and always match \D, \S, and \W. This is true even when Unicode character property support is available.

    From Handling UTF-8 with PHP. Therefore it’s actually irrelevant if your URL is ISO-8859-1 encoded (mysite.local/citytest/M%FCnchen) or UTF-8 encoded (mysite.local/citytest/M%C3%BCnchen), the default regex won’t match.

    I also made experiments with umlauts in URLs in Zend Framework and came to the conclusion that you wouldn’t really want umlauts in your URLs. The problem is, that you cannot rely on the encoding used by the browser for the URL. Firefox (prior to 3.0) for example does not UTF-8 encode URLs entered into the address textbox (if not specified in about:config) and IE does have a checkbox within its options to choose between regular and UTF-8 encoding for its URLs. But if you click on links within a page both browsers use the URL in the given encoding (UTF-8 on an UTF-8 page). Therefore you cannot be sure in which encoding the URLs are sent to your application – and detecting the encoding used is not that trivial to do.

    Perhaps it’s better to use transliterated parameters in your URLs (e.g. change Ä to Ae and so on). There is a really simple way to this (I don’t know if this works with every language but I’m using it with German strings and it works quite well):

    function createUrlFriendlyName($name) // $name must be an UTF-8 encoded string {     $name=mb_convert_encoding(trim($name), 'HTML-ENTITIES', 'UTF-8');     $name=preg_replace(         array('/&szlig;/', '/&(..)lig;/', '/&([aouAOU])uml;/', '/&(.)[^;]*;/', '/\W/'),         array('ss', '$1', '$1e', '$1', '-'),         $name);     $name=preg_replace('/-{2,}/', '-', $name);     return trim($name, '-'); } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today, I've stumbled over the following: Consider two classes NewClass and NewClass1, which have
In a code review today, I stumbled across the following bit of code (slightly
I just today stumbled upon the Code Metrics thing, after having used Visual Studio
Today I encountered the following situation: (pseudo code) class MyClass { public void workOnArray(Object[]
today i have a simple an understable problem for me . Next code: alphavar
Today I started thinking about a new project, and I found one. The goal
today the default route for my site stopped working, but the strange thing is
Today something peculiar happened while debugging in VS 2008. I will give the small
Today I try to make a dynamic dropdownlist using jQuery. I only provide one
Today I added a new feature in the content management system I'm building. Depending

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.