Ticket #2971 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Test if output of XML based OGR drivers is valid UTF-8

Reported by: rouault Owned by: rouault
Priority: normal Milestone: 1.7.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: ogr encoding utf8
Cc: warmerdam, chaitanya

Description

This ticket tracks a simple way of ensuring that XML based OGR drivers will produce valid UTF-8 XML files.

Two new functions will be added in the CPL recode API : CPLIsUTF8() and CPLForceToASCII().

They will be used by a OGRGetXML_UTF8_EscapedString() function (in ogr/ogr_utils.cpp) that will take care of forcing to ASCII if necessary and XML escaping the result. This will be used by the CreateFeature?() of GML, KML, GPX and GeoRSS drivers.

Change History

Changed 3 years ago by rouault

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

Done in r16903

Changed 3 years ago by rouault

Test added for the GML driver in r16904

Note: See TracTickets for help on using tickets.