MapGuide Open Source:  Home |  Download |  Internals

Ticket #617 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

Utf8 support for Selection (attribute value display)

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

07/07/08 15:32:29 changed by tomfukushima

  • owner set to chrisclaydon.

07/08/08 18:56:44 changed by pagameba

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

07/09/08 10:52:23 changed by chrisclaydon

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.

07/09/08 11:35:49 changed by poulet1212

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

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

Regards.

07/09/08 11:44:49 changed by pagameba

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

07/09/08 12:09:09 changed by poulet1212

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