[GRASS-dev] new v.in.geonames: problems with UTF-8 Unicode text
Markus Neteler
neteler at osgeo.org
Tue Jul 1 05:38:08 EDT 2008
On Mon, Jun 30, 2008 at 11:16 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
> Markus Neteler wrote:
...
> After which, the file appears to import without any problems.
>
> I have committed a fix to G_tokenize(), and also enlarged the buffers
> in v.in.ascii to 4000 bytes (although removing fixed limits altogether
> would be better).
Excellent, now also the Polish file is getting imported.
This closes
http://trac.osgeo.org/grass/ticket/202
But:
when using the SQLite driver, it cuts the "alternatename" field at
256 chars due to a hardcoded limitation in describe.c. I don't
remember why not varchar() length is used there.
What about this patch?
Index: db/drivers/sqlite/describe.c
===================================================================
--- db/drivers/sqlite/describe.c (revision 31904)
+++ db/drivers/sqlite/describe.c (working copy)
@@ -173,7 +173,7 @@
break;
case SQLITE_TEXT:
- fsize = 255;
+ fsize = 99999;
break;
The PostgreSQL driver has a function to find out the column length.
With this change the full "alternatename" field is imported into SQLite.
Markus
More information about the grass-dev
mailing list