Ticket #585 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

Multibyte Tags redirect badly or Tag not found

Reported by: mdawaffe Assigned to: 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

02/12/07 08:44:49 changed by mdawaffe

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

(in reply to: ↑ description ) 03/03/07 22:40:05 changed by kevinmenoth

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. 1. In bbPress' config.php, set $bb->debug = 1; 1. Visit that new tag's permalink page. 1. 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

03/14/07 04:28:17 changed by sambauers

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

(in reply to: ↑ description ; follow-up: ↓ 5 ) 04/22/07 11:06:00 changed by yujin

  • keywords changed from multibyte utf8 to multibyte utf8 uri encode.
  • owner set to yujin.
  • status changed from new to assigned.
  • component changed from Administration to i18n/l10n.

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.

(in reply to: ↑ 4 ) 04/22/07 11:09:26 changed by yujin

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

06/07/07 21:18:20 changed by mdawaffe

  • milestone changed from 1.0 to 0.8.2.

06/15/07 01:34:42 changed by mdawaffe

  • status changed from assigned to closed.
  • resolution set to fixed.

I think this was probably fixed by [846]