Opened 13 years ago

Closed 13 years ago

#260 closed defect (fixed)

Character encoding is not specified for RDF content

Reported by: inigo Owned by: Nobody
Priority: normal Milestone:
Component: openguides Version: svn
Severity: normal Keywords:
Cc:

Description

The XML version declaration is:

<?xml version="1.0"?>

for the RDF - so the character encoding will default to UTF-8. This is not correct for sites that are using ISO-8859-1.

Attachments (1)

fix_rdf_encoding.txt (2.3 KB) - added by inigo 13 years ago.
Subversion diff fixing RDF encoding

Download all attachments as: .zip

Change History (4)

comment:1 Changed 13 years ago by inigo

Looks like this can be fixed by altering the first line of rdf_index.tt and node_rdf.tt to:

<?xml version="1.0" encoding="[% config.http_charset %]" ?>

(not tested, yet...)

comment:2 Changed 13 years ago by inigo

For this to work, emit_rdfxml in RDF.pm needs to have config => $config, added to its %tt_vars.

It's also nicer to use:

?xml version="1.0" [%- IF config.http_charset %]encoding="[% config.http_charset %]"[%- END %]?>

to cope if the charset isn't provided.

Changed 13 years ago by inigo

Attachment: fix_rdf_encoding.txt added

Subversion diff fixing RDF encoding

comment:3 Changed 13 years ago by Dominic Hargreaves

Resolution: fixed
Status: newclosed

(In [1232]) Fix RDF encoding (fixes #260); thanks Inigo

Note: See TracTickets for help on using tickets.