Hi,

Pathauto doesn't work with unicode string. As I tested Hebrew and Arabic titles does not work correctly. For example if title of a page is مطر (Whic mean Rain in arabic), pathauto extract a path like this:
http://www.site.com/category-01

Does Pathauto support mbstring?

Comments

Mamouri’s picture

greggles’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

What happens if you create the aliases manually through http://example.com/admin/build/path

I'm not really sure what pathauto should be doing differently because I don't deal with i18n issues much, so I will probably need someone else to create and test the patch for this issue. I posted a comment asking for help but I'm not hopeful that will give the assistance needed.

sung-suh park’s picture

I'm Korean and I have some idea about this issue.
It works well drupal path module. So it's issue of pathauto.

this code make problem.

  $pattern = '/[^a-zA-Z0-9]+/ ';
  $output = preg_replace($pattern, $separator, $output);

that replace all other letters including space & quotation mark.

you can fix code like this
<?php
$pattern = '/[[:space:]]+/ ';
$output = preg_replace($pattern, $separator, $output);
$output = rawurlencode($output);
%>

this code makes characers like '%D7%A2%D7%91%D7%A8%D7%99%D7%AA' except space & quotation mark. But many times we like to get space & quotation mark by urlencode.

three case possible

1. all the letters without alphanumeics replace to separators.
2. space & quotation mark(or else?) replace to separators. and rawurlencode others.
3. rawurlencode all the thing

Web browser has option about automatically encode characters to url encode utf-8. so we can use all the characters in url field of browser.

Its first time to make site with drupal. Thank you for this great module.

greggles’s picture

Version: 5.x-1.2 » 5.x-2.x-dev

@sung-suh park - thanks very much for your tips.

I'd like to fix this in the 5.x-2 version of Pathauto. The 5.x-1.x branch is basically dead as far as new functionality is concerned and this is definitely new functionality.

So, in that version it only runs that preg_replace if you have transliteration enabled. The idea is that if you are trying to transliterate then all characters should be replaced, even if they aren't in the transliteration table. As I think about that more and knowing now that preg_replace is responsible for this problem, I think I should just remove it.

@Mamouri - would that solve the problem for you to just remove that expression?

The handling of "special characters" or punctuation is something that needs to be dealt with separately and there's another issue for it http://drupal.org/node/143831

Mamouri’s picture

@sung-suh park
Thank you for the patch

@eggles
Sorry for delay with answer. Yes it work fine for me.

greggles’s picture

So, is this now fixed or is it still broken?

If it's broken, please provide a patch - http://drupal.org/patch/create

hass’s picture

subscribe

momper’s picture

subscribe

greggles’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I don't know that this is a problem so I'm closing it.

If anyone still suffers form this problem please let me know specifically what I can do to fix it.

crush’s picture

{comment in Dhivehi removed}

adrianmak’s picture

I'm Chinese.

I have an idea , the module can provide an option to use one desire languages to generate alias.
For example, if my site has four languges
English
Chinese Traditional
Chinese Simplified
Japanese

Then I can select English as for all url alias generation no matter what is the title of other languages

klonos’s picture

@adrianmak: perhaps you can take a look at #736178: Add a [node:source] token for source node of a translated node

also my post there where I request the same thing: http://drupal.org/node/736178#comment-2694546

klonos’s picture

Status: Closed (fixed) » Closed (duplicate)

This is rather a duplicate, but it is surely not fixed.

trkest’s picture

After much head scratching I found a work around to this; setup URL alias for each of the arabic taxonomy names
/admin/build/path/add

No need to change the pathauto settings or hardcode the menu

klonos’s picture

Title: Pathauto does not support unicode (Hebew, Arabic) Title » Pathauto does not support unicode (Hebrew, Arabic) Title

...minor typo in issue title ;)