Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2971 closed defect (fixed)

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

Reported by: Even Rouault Owned by: Even 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 (2)

comment:1 by Even Rouault, 15 years ago

Resolution: fixed
Status: newclosed

Done in r16903

comment:2 by Even Rouault, 15 years ago

Test added for the GML driver in r16904

Note: See TracTickets for help on using tickets.