[GRASS-dev] Non ASCII in GISBASE, LOCATION, MAPSET, MAP
glynn at gclements.plus.com
Tue Apr 20 10:12:34 EDT 2010
Radim Blazek wrote:
> > The main restriction is G_legal_filename(), in lib/gis/legal_name.c.
> > This prohibits all characters >=127 and <=32 as well as the specific
> > characters:
> G_legal_filename is used in lib/init/set_data.c to check MAPSET and
> LOCATION_NAME. Does it mean that there are no restrictions for
Correct. At least, there *shouldn't* be any restrictions for GISDBASE
[On Windows, they must be be accessible via the codepage-based API,
i.e. they can't contain characters outside of the current codepage.
This isn't something which can easily be worked around.]
> > As you know, vector map names are further restricted to valid SQL
> > identifiers. Personally, I'd like to see that restriction removed.
> > There's no fundamental reason why a map's attribute table must have
> > *exactly* the same name as the map; an approximation (e.g. with
> > invalid characters replaced by underscores) would suffice, IMHO.
> Just simple replacement results in duplicate names, does not?
It's possible that could occur, but it seems unlikely in practice. In
the worst case, the code could add a unique suffix (_1, _2, etc) in
the event of a conflict.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev