Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#617 closed defect (fixed)

Utf8 support for Selection (attribute value display)

Reported by: poulet1212 Owned by: chrisclaydon
Priority: medium Milestone:
Component: Fusion Version: 2.0.1
Severity: major Keywords:
Cc: External ID:

Description

Component: Selection tool, String Attribute with accents do not display properly

Bug: String values are not properly read from featureReader to support Utf8 Charset.

Fix: Simply changing in this file: www\fusion\MapGuide\php\Utilities.php

Function: GetPropertyValueFromFeatReader

this:

case MgPropertyType::String :
$val = $featureReader->GetString($propertyName);
break;

to this:

case MgPropertyType::String :
$val = utf8_decode($featureReader->GetString($propertyName));
break;

fixes this problem

Change History (6)

comment:1 by tomfukushima, 16 years ago

Owner: set to chrisclaydon

comment:2 by pagameba, 16 years ago

how does this relate to http://trac.osgeo.org/fusion/ticket/83? Are they compatible changes?

comment:3 by chrisclaydon, 16 years ago

Hi poulet1212,

Can you please try out the fix described in http://trac.osgeo.org/fusion/ticket/83 and let us know if it resolves your problem. This change is already in the Fusion trunk code, and will get picked up by MGOS next time we update the version of Fusion it uses.

comment:4 by poulet1212, 16 years ago

Resolution: fixed
Status: newclosed

Hi Chris, yes, ticket 83 solves this problem. It's ok.

Regards.

comment:5 by pagameba, 16 years ago

so my next question is which is the better fix, or are they equivalent?

comment:6 by poulet1212, 16 years ago

Hi pagameba, at a firat approach I would like to say that

utf8_decode($value);
and
htmlentities($value,ENT_COMPAT,'UTF-8'); 

do the same (only regarding the charset naturally).

But, if we do not handle the charset directly when getting a String property from the FeatureReader, we must do that later.

So, is it better to do that when getting the string from featurereader like proposed in this ticket or is it better to handle the charset later like in ticket 83? I think it would be fine to do that when getting the string from featurereader because other scripts might use this utility function.

Regards

Note: See TracTickets for help on using tickets.