Phillippe,<br><br>You can start with <a href="http://trac.osgeo.org/gdal/wiki/BuildHints">http://trac.osgeo.org/gdal/wiki/BuildHints</a> if you want to do this yourselves.<br>You can file a ticket at <a href="http://trac.osgeo.org/osgeo/newticket">http://trac.osgeo.org/osgeo/newticket</a> and attach your patch there.<br>
<br>Also, provide a link to the MSSQL documentation regarding this.<br><br>Thank you.<br><br><div class="gmail_quote">On Fri, Mar 30, 2012 at 12:14 PM, philippe.suray <span dir="ltr">&lt;<a href="mailto:philippe.suray@market-ip.com">philippe.suray@market-ip.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I am trying to load a shape file encoded in UTF-8 in SQLServer2008.<br>
I use this command from ogr2ogr to load the data&#39;s:<br>
<br>
ogr2ogr --debug on -f MSSQLSpatial<br>
&quot;MSSQL:server=localhost;database=ogr2ogrTest;Trusted_Connection=True;&quot;<br>
&quot;myShapeFile.shp&quot; -t_srs EPSG:4326 -dsco ENCODING=UTF-8 -lco ENCODING=UTF-8<br>
-overwrite -progress<br>
<br>
When I check the records in the DB, some fields are not correctly encoded.<br>
<br>
According to SQLServer documentation and to my understanding: in order to<br>
store unicode, the fields must be declared as NCHAR or NVARCHAR and the<br>
insert or update statements must append &#39;N&#39; before the value (INSERT INTO<br>
tForeignLanguage ([Name]) VALUES (N&#39;Араб&#39;))<br>
<br>
I also search about unicode in this list and found:<br>
- <a href="http://osgeo-org.1560.n6.nabble.com/RFC-23-OGR-Unicode-td3759338.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/RFC-23-OGR-Unicode-td3759338.html</a><br>
- <a href="http://trac.osgeo.org/gdal/wiki/rfc23_ogr_unicode" target="_blank">http://trac.osgeo.org/gdal/wiki/rfc23_ogr_unicode</a><br>
<br>
I downloaded the latest source code from <a href="http://www.gdal.org/daily/" target="_blank">http://www.gdal.org/daily/</a> and<br>
check into mssqlspatial component and found that the driver does not respect<br>
these assumptions:<br>
- fields are created as VARCHAR,<br>
- statements does not append &#39;N&#39;<br>
<br>
I really need this unicode support but I am not very familiar with C++,<br>
could you help me to implement a patch to test the loading of a shapefile<br>
into SQLServer2008.<br>
What classes should I change and how?<br>
<br>
Thank you for your help.<br>
<br>
Best regards.<br>
<br>
Philippe<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/UTF-8-problem-with-MSSQLSpatial-and-ogr2ogr-tp4670214p4670214.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/UTF-8-problem-with-MSSQLSpatial-and-ogr2ogr-tp4670214p4670214.html</a><br>

Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>