<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=NO-BOK link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>You’ve probably had it with encoding issues, but I can’t seem to figure it out. I sure hope the Mailing List can help me with this one.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I have a shapefile encoded in latin1 . Until recently I have been able to use CONNECTIONTYPE OGR to access that table like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>CONNECTIONTYPE OGR<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>CONNECTION "TM_Nett/TM_Traces.shp"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>You are probably wondering why I’m not using the DATA keyword instead of these lines, and that would indeed solve the encoding problem (I’ve tried). The reason why I use OGR is that I need a FILTER applied to the given layer, and to hide data from the WFS service, using OGR seemed like a nice workaround (I’ve recently sent an email regarding this issue).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The problem started when I upgraded to PHP 5.4, replacing multiple DLLs in the cgi-bin directory of my MS4W installation. The OGR will now only return me attributes encoded in UTF-8 (I can see no other possibility that it converts the data from latin1 to UTF-8). The UTF-8 attributes are not compatible with the rest of the layers, which returns latin1 (using DATA).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><br>Anyone have got a clue of where the problem might be? Is it that the original shapefile have some wrong headers causing the OGR driver to do a conversion (I’ve tried saving the shapefile as both Latin1 and UTF-8 in QGIS with no luck)? Is it possible to tell the OGR driver what encoding to use?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Best Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Håkon<o:p></o:p></span></p></div></body></html>