<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi,<br>
<br>
You shouldn't know that file name is UTF. It maybe not in UTF
(e.g. in you system encoding - in Linux usually UTF-8, in Windows
- CP1252, CP1251 etc.). <br>
But you command line shell (bash, cmd, etc.) should encode the
input to the UTF8, or you have to set the environment variable
GDAL_FILENAME_IS_UTF8 to NO. <br>
<pre class="moz-signature" cols="72">Best regards,
Dmitry</pre>
09.01.2014 4:00, maven apache пишет:<br>
</div>
<blockquote
cite="mid:CA+FxMdUpuHxN_AdjLtCfbD=Pj=DGCMo1RQZKApgM2dzfmbe8Zg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi:
<div><br>
</div>
<div>Thanks for your reply.</div>
<div><br>
</div>
<div>But I wonder how do I know if the file name is utf8? Since
not all of the filename contain no-asci characters.</div>
<div><br>
</div>
<div>
Thanks</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014/1/8 Dmitriy Baryshnikov <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:bishop.dev@gmail.com" target="_blank">bishop.dev@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Hi,<br>
<br>
The GDAL utilities expected all input paths in UTF-8
encoding. If you want to use system native encoding you
have to set GDAL_FILENAME_IS_UTF8 environment variable
to NO.<br>
<a moz-do-not-send="true"
href="http://trac.osgeo.org/gdal/wiki/ConfigOptions#GDAL_FILENAME_IS_UTF8"
target="_blank">http://trac.osgeo.org/gdal/wiki/ConfigOptions#GDAL_FILENAME_IS_UTF8</a><br>
<pre cols="72">Best regards,
Dmitry</pre>
08.01.2014 4:03, maven apache пишет:<br>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">Hi:
<div><br>
</div>
<div>This is a cross post first post at <a
moz-do-not-send="true"
href="http://gis.stackexchange.com/questions/82142/ogr2ogr-does-not-support-file-name-with-non-ascii-character"
target="_blank">http://gis.stackexchange.com/questions/82142/ogr2ogr-does-not-support-file-name-with-non-ascii-character</a></div>
<div><br>
</div>
<div>Since I got no answer, then I think I may
post it here, this is the original question:</div>
<div><br>
</div>
<div>
<p> I tried to use the following script to
convert shapefile to mif:</p>
<pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:12px;vertical-align:baseline;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:rgb(238,238,238);word-wrap:normal;color:rgb(51,51,51);line-height:18px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;color:rgb(34,34,34)">ogr2ogr -f "MapInfo File" D:\docs\arcgis_data\shp_mif\BOU.mif D:\docs\arcgis_data\shp\BOU.shp
</code></pre>
<p> it works.</p>
<p> But I found that if the name of the
shapefile has non-ASCII characters like this:</p>
<pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:12px;vertical-align:baseline;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:rgb(238,238,238);word-wrap:normal;color:rgb(51,51,51);line-height:18px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;color:rgb(34,34,34)">D:\docs\arcgis_data\shp\臺北.shp
</code></pre>
<p> Then the covert will fail with message:</p>
<pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:12px;vertical-align:baseline;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:rgb(238,238,238);word-wrap:normal;color:rgb(51,51,51);line-height:18px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;color:rgb(34,34,34)">Unable to open datasource `D:\docs\arcgis_data\shp\臺北.shp' with the following drivers
......
</code></pre>
<p> Any idea to fix it?</p>
<p> Looking for replay.</p>
<p> <br>
</p>
<p> Yang</p>
<p> 2014.1.8</p>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
gdal-dev mailing list
<a moz-do-not-send="true" href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"
target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
<br>
</body>
</html>