Foreign character browse terms

Project:RUcore/NJDH/Partner Portal Search
Version:5.2
Component:Portal Creation/Editing/Management - Search Portal Tool
Category:bug report
Priority:normal
Assigned:ananthan
Status:closed
Description

Foreign character browse terms setup in the portal tool do not work as expected when viewing at the client end.

Comments

#1

Version:5.1» 5.2

#2

Component:Searching» Portal Creation/Editing/Management - Search Portal Tool
Status:active» test

Fixed. The issue was foreign characters were being encoded using Javascript before sending, via AJAX, for a number of results found. PHP could not decode the foreign characters using url_decode. I was able to find and implement the following function and it seems to have done the trick.

function utf8_urldecode($str) {
$str = preg_replace("/%u([0-9a-f]{3,4})/i","&#x\\1;",urldecode($str));
return html_entity_decode($str,null,'UTF-8');;
}

To test create a browse list entry by searching with a foreign character such as 猫. Confirm some results were found and save with a label that also has a foreign character. Then go to the portal that is using the browse list, click on the link and confirm the same number of results were returned.

#3

Assigned to:chadmills» ananthan

#4

Status:test» active

Created a test portal to test this.

Test portal : ka test portal for foreign characters.
Assigned collection: Center for Women's Global Leadership collection.
Browse list: foreign character browse list
Terms added: Paré and 猫

Added subject terms to: rutgers-lib: 25101
Subject terms added: 猫, Σψ∗,Paré

I tried to add these browse terms in the test portal, it returns 0 results.
TItle of this object is: Wheel of Equality

I searched for "Paré" in subject in my test portal and it returns 0 results.

#5

Status:active» test

UTF-8 searching should be working again. Something corrupted the copy of "vis" I was using. I moved to referencing the copy dlr/EDIT uses.

#6

Subject Human Rights Σψ∗, Σψ∗, Paré, 猫, Women's Rights, Paré

clicking on Σψ∗, Paré, 猫 work OK.

clicking on Women's Rights breaks. In the search form, "Women's Rights" appears as the search term.

#7

Status:test» closed

This particular record has the value "Women's Rights" in the mods so it is searching using that value, thus causing the problem.

Back to top