[GRASS-dev] Re: mapsets and locations with spaces on wingrass?

Glynn Clements glynn at gclements.plus.com
Thu Oct 16 05:23:32 EDT 2008


andrea antonello wrote:

> So if I got it right, the fact that locations and mapsets with spaces
> work in GRASS on linux and unix is more a present of the operating
> system, than anything else? The fact that paths in windows are a bit
> stranger (%20 for spaces in urls, the leading \ and such...) makes
> this all messy?

No. Spaces are specifically prohibited in location names, mapset
names, map names or other "names", on all platforms.

Spaces *are* permitted in paths, including the database path
(GISDBASE).

However, using spaces in file and directory names has historically
been uncommon on Unix (they are problematic for command-line use, as
you have to use quoting), and the ability to run GRASS natively on
Windows is a relatively recent situation.

Consequently, bugs which only affect paths containing spaces have
started to be discovered as more people use GRASS on Windows, where
spaces in paths are common.

The characters which are specifically prohibited (by GRASS) from being
used in "names" are prohibited because they are used by GRASS itself. 
E.g. "@" is used to separate the map name from the mapset name in a
qualified map name, "=" is used to separate option values from option
names, "," is used to separate values in a list, etc.

Unix allows any character (byte) to appear in a filename except for
"/" (the directory separator) and the NUL byte (the C string
terminator). You can even have newlines in filenames (although that
will cause all sorts of problems with various programs).

But Windows prohibits several additional characters in filenames. 
GRASS itself doesn't try to prevent you from using those characters in
names, but as GRASS uses those names as file and directory names, they
won't work on Windows.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list