<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 http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
{font-family:"Segoe UI Semibold";
panose-1:2 11 7 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Segoe UI",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:72.0pt 72.0pt 72.0pt 72.0pt;}
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="en-SE" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Segoe UI",sans-serif">Hello list.
<br>
<br>
I have encountered a Filename.tif with an associated metadata file, Filename.aux. The .aux file can be understood by gdalinfo, which says<br>
<br>
</span><span lang="EN-GB" style="font-family:"Courier New"">Driver: HFA/Erdas Imagine Images (.img)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Courier New"">Files: Filename.aux<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Courier New""> Filename.rrd<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Courier New""> Filename.rde
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="en-SE" style="font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Segoe UI",sans-serif">As I understand it, the .aux file is on an Erdas Imagine format intended to describe metadata for the Erdas .img format, but it can also be used to describe metadata for .tif
files as in my case. (I have the Filename.rrd and the Filename.rde but not any Filename.img, so it is somewhat strange but useful that GDAL can read the .aux file directly).
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Segoe UI",sans-serif">Anyway, my question is: when the Filename.aux contains strings, in my case descriptions of terrain types represented by integers (part of a Raster Attribute Table), is there an
established way to figure out whether the strings are stored in UTF-8, or if not, what codepage is used? In my case, the strings seem to be stored as 8-bit ASCII using the codepage 1252 (mainly for West-European alphabets), but GDAL seems to expect UTF-8 so
the Swedish characters with diacritics become garbled. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Segoe UI",sans-serif">I realize that if the .aux format is proprietary and has just been reverse-engineered, then maybe no-one knows the answer to this. But I am curious if anyone has had similar problems
and maybe figured out a workaround. Or if there are any grounds to say that UTF-8 is mandatory in the .aux format, then my example file would be incorrect and that would also be useful to know.
<br>
<br>
Best regards, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="en-SE" style="font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Segoe UI Semibold",sans-serif;color:#D18765;mso-ligatures:none;mso-fareast-language:#2000">Mikael Rittri</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#D18765;mso-ligatures:none;mso-fareast-language:#2000"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:"Segoe UI Semibold",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:#2000">Carmenta Geospatial Technologies<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:"Segoe UI Semibold",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:#2000">Sweden</span><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:#2000"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:"Segoe UI",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:#2000">carmenta.com<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:black;mso-ligatures:none;mso-fareast-language:#2000"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ligatures:none;mso-fareast-language:#2000"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="en-SE"><o:p> </o:p></span></p>
</div>
</body>
</html>