<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body ><div><br></div><div><br></div><div><br></div><div><div style="font-size:75%;color:#575757">Envoyé depuis un mobile Samsung</div></div><br><br><br>-------- Message d'origine --------<br>De : "> Even Rouault (par Internet, dépôt gdal-dev-bounces@lists.osgeo.org)" <even.rouault@mines-paris.org> <br>Date : 12/07/2014  9:29 PM  (GMT+01:00) <br>A : Brian McCormick <mccorb@cox.net> <br>Cc : gdal-dev@lists.osgeo.org <br>Objet : Re: [gdal-dev] Reading shapefile PRJ failing <br> <br><br>Brian,<br><br>I've added support in GDAL trunk for those files. I could see that at least <br>another GIS software supported them, so...<br><br>Even<br><br>> Even,<br>> <br>> I am not sure what generated it. It seems as though I have run across a lot<br>> of files that have a BOM that have thrown me in recent years. Most seem to<br>> have some relation to using Microsoft .net framework tools that have<br>> Unicode support built in from the ground up. But I am really not sure and<br>> that is just a guess. Some text editors seem to do it also. I just know<br>> that it has caused me all sorts of grief over the years with all sorts of<br>> software I have both used and written.<br>> <br>> Here is what I have used in the past for the BOM list although the EF BB BF<br>> is by far the most common I have seen...<br>> http://en.wikipedia.org/wiki/Byte_order_mark<br>> <br>> Anyway I have attached a shapefile that has a bom marker in the prj file.<br>> Not sure yet about the other files...if they have any similar anomalies or<br>> exactly what was used to gen the shapefile. I haven't looked at the shp,<br>> shx or dbf file yet...<br>> <br>> Thanks,<br>> <br>> <br>> Brian S. McCormick<br>> mccorb@cox.net<br>> 918-749-5453<br>> <br>> <br>> <br>> -----Original Message-----<br>> From: Even Rouault [mailto:even.rouault@mines-paris.org]<br>> Sent: Saturday, July 12, 2014 12:32 PM<br>> To: mccorb<br>> Subject: Re: [gdal-dev] Reading shapefile PRJ failing<br>> <br>> Le samedi 12 juillet 2014 18:45:24, vous avez écrit :<br>> > So I have tracked this down to the fact that the PRJ files that I have<br>> > been given to use have a BOM of 0xEF 0xBB 0xBF for the first three<br>> > bytes of the file.<br>> > <br>> > When I use the shapefiles that have these byte order markers the Layer<br>> > class method getSpatialRef() (java JNI bindings) returns null. I am<br>> > guessing that the PRJ file is being opened in binary mode instead of<br>> > text mode possibly?<br>> > <br>> > Regardless, is there any setting I can make to coerce the file<br>> > opener/reader into ignoring the BOM when grabbing the WKT from the PRJ<br>> > file?<br>> <br>> Not really. GDAL should be enhanced to support such a file. Do you have a<br>> sample of such a .prj ? Do you know which software has generated it ?<br>> That's the first time I hear about .prj with BOM marker.<br>> <br>> > thanks<br>> > <br>> > <br>> > <br>> > --<br>> > View this message in context:<br>> > http://osgeo-org.1560.x6.nabble.com/Reading-shapefile-PRJ-failing-tp51<br>> > 5077 8.html Sent from the GDAL - Dev mailing list archive at<br>> > Nabble.com.<br>> > _______________________________________________<br>> > gdal-dev mailing list<br>> > gdal-dev@lists.osgeo.org<br>> > http://lists.osgeo.org/mailman/listinfo/gdal-dev<br>> <br>> --<br>> Geospatial professional services<br>> http://even.rouault.free.fr/services.html<br><br>-- <br>Geospatial professional services<br>http://even.rouault.free.fr/services.html<br>_______________________________________________<br>gdal-dev mailing list<br>gdal-dev@lists.osgeo.org<br>http://lists.osgeo.org/mailman/listinfo/gdal-dev</body>