[GRASS-dev] Re: new v.in.geonames: problems with UTF-8 Unicode text

Markus Neteler neteler at osgeo.org
Mon Jul 7 15:28:51 EDT 2008


On Mon, Jul 7, 2008 at 8:34 PM, Glynn Clements <glynn at gclements.plus.com> wrote:
...
> It also means that, for VARCHAR columns, you cannot determine the
> maximum width that can be stored in the column.

But doesn't v.in.ascii scan for column lengths in any case?
Maybe make that switchable and use the extracted info?

in point.c:
/* Analyse points ascii file. Determine number of columns and column types.
 * ascii_tmp: write copy of tempfile to ascii_tmp:
 * rowlength: maximum row length
 * ncolumns: number of columns
 * minncolumns: minimum number of columns
 * column_type: column types
 * column_length: column lengths (string only)
 */

int points_analyse(FILE * ascii_in, FILE * ascii, char *fs,
                   int *rowlength, int *ncolumns, int *minncolumns,
                   int **column_type, int **column_length, int skip_lines,
                   int xcol, int ycol, int region_flag)


Markus


More information about the grass-dev mailing list