Opened 6 years ago

Closed 6 years ago

#585 closed defect (fixed)

Multibyte Tags redirect badly or Tag not found

Reported by: mdawaffe Owned by: yujin
Priority: normal Milestone: 0.8.2
Component: i18n/l10n Version: 0.8
Severity: normal Keywords: multibyte utf8 uri encode
Cc:

Description

It seems some browsers or servers (or some combinations) don't like the way bbPress deals with multibyte tags.

If you have this problem please help us debug it by following these steps.

  1. Create a new (multibyte) tag.
  2. In bbPress' config.php, set $bb->debug = 1;
  3. Visit that new tag's permalink page.
  4. Paste the ugly debug code at the top of that page here.

Change History (7)

  • Summary changed from Multibyte Tags redirect badly to Multibyte Tags redirect badly or Tag not found

Replying to mdawaffe:

It seems some browsers or servers (or some combinations) don't like the way bbPress deals with multibyte tags.

If you have this problem please help us debug it by following these steps.

  1. Create a new (multibyte) tag.
  2. In bbPress' config.php, set $bb->debug = 1;
  3. Visit that new tag's permalink page.
  4. Paste the ugly debug code at the top of that page here.

dears, here is the error generated as instructed. I'm trying to tag in Malayalam language.

REQUEST_URI: string(61) "/wp/bbpress/tags.php?tag=%E0%B4%95%E0%B4%B5%E0%B4%BF%E0%B4%A4"
should be: string(37) "/wp/bbpress/tags.php?tag=കവിത"
full permalink: string(53) "http://localhost/wp/bbpress/tags.php?tag=കവിത"
PATH_INFO: NULL

Warning: Cannot modify header information - headers already sent by (output started at D:\xampplite\htdocs\WP\bbpress\bb-includes\functions.php:1665) in D:\xampplite\htdocs\WP\bbpress\bb-includes\functions.php on line 1819

Tag not found

For what it's worth, it works for me using:

  • Safari on Mac OS X
  • WebKit? on Mac OS X
  • Firefox 2 on Mac OS X
  • Firefox 2 on Windows 2000
  • IE 6 on Windows 2000
  • IE 7 on windows XP

Mac tests worked flawlessly. For windows tests, page worked but I got squares where characters should be, I may not have a utf-8 font installed though.

All served from Apache-2.0.59, PHP 5.2.1-pl3, MySQL 5.0.32 on Gentoo Linux

comment:4 in reply to: ↑ description ; follow-up: ↓ 5   yujin6 years ago

  • Component changed from Administration to i18n/l10n
  • Keywords uri encode added
  • Owner set to yujin
  • Status changed from new to assigned

It seems some browsers or servers (or some combinations) don't like the way bbPress deals with multibyte tags.

I guess bbPress should encode the URIs with multibyte characters. Some browsers automatically do so when they encounter non-encoded links but you should not expect this to all the other browsers. "Should be:" in debug code should be encoded;-p

Adding a line in <code>bb_repermalink)0</code> as shown below seems to be working so far but there may be a side effect . Plus, I don't know what will happen in charsets other than utf-8. I expect someone will fix this in more proper way.

<code>bb_repermalink()</code> in file <code>bb-includes/functions.php</code>
<blockquote><code>
$domain = bb_get_option('domain');
$domain = preg_replace('/https?/', , $domain);
$check = preg_replace( '|
.*' . trim($domain, ' /' ) . '|', , $permalink, 1 );
$check = utf8_uri_encode($check); add this line
</code></blockquote>

I hope this will help you.

comment:5 in reply to: ↑ 4   yujin6 years ago

Oops, I guess I'm doing something wrong with this Trac system.

  • Milestone changed from 1.0 to 0.8.2
  • Resolution set to fixed
  • Status changed from assigned to closed

I think this was probably fixed by [846]

Note: See TracTickets for help on using tickets.