History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OX-3866
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Chris Nutting
Reporter: Pawel Dachterski
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
OpenX Ad Server

Geotargeting doesn't work with special characters

Created: 19/Aug/08 03:12 PM   Updated: 29/Oct/08 09:52 AM
Component/s: OXP: Delivery Engine
Affects Version/s: OpenX 2.6.1
Fix Version/s: Milestone 24, OpenX 2.6.3
Security Level: Public (All users can see these issues)

Time Tracking:
Original Estimate: 4h
Original Estimate - 4h
Remaining Estimate: 3.83h
Time Spent - 0.17h Remaining Estimate - 3.83h
Time Spent: 0.17h
Time Spent - 0.17h Remaining Estimate - 3.83h

Issue Links:

Passed QA Version/s: OpenX 2.6.3

 Description  « Hide
Geotargeting doesn't work with special characters.

In GeoIP.delivery.php line 80, added:
$ret = array(
'country_code' => 'CH',
'region' => 25,
'city' => "Z".chr(252)."rich",
'latitude' => 47.3667,
'longitude' => 8.55

Same rule in delivery limitation for Country/City with "is equal". Result - ad is not displayed. It's probably because of problems with encodings.

 All   Comments   Work Log   Change History   FishEye   Crucible   Builds      Sort Order: Ascending order - Click to sort in descending order
Chris Nutting - 27/Aug/08 10:39 AM
The issue is that the data being read out of the MaxMind .dat file is not UTF8 encoded, therefore the comparison operators do not find a match.

I'm fixing this in 2.7 (with the decoupling of the geoTargeting plugins ticket OX-2873) but it needs to be decided if this should be backported.

The fix is to add this to the MaxMind .dat reading library file (plugins/geotargeting/GeoIP/data/geo-geoip.inc.php):

// The data comes out of the MaxMind .dat file in ISO-8859-1 encoding, convert this to UTF-8
    foreach ($ret as $key => $value) {
        $ret[$key] = MAX_commonConvertEncoding($value, 'UTF-8', 'ISO-8859-1');

To the MaxMind .dat reading library file

Chris Nutting - 28/Oct/08 11:37 AM
This was already fixed in 2.8 when OX-2873 was done (the refactoring of old-style plugins)

I can't track back further to find the exact version it was fixed in, but the fixed plugin was added in changeset 24834

Pawel Dachterski - 29/Oct/08 09:52 AM
working good in 2.6.3 rc6