[GRASS-dev] [GRASS GIS] #2136: Create standard options for map or file base name (prefix)

GRASS GIS trac at osgeo.org
Wed Jun 25 12:31:14 PDT 2014


#2136: Create standard options for map or file base name (prefix)
-----------------------------------------+----------------------------------
 Reporter:  wenzeslaus                   |       Owner:  grass-dev@…              
     Type:  defect                       |      Status:  new                      
 Priority:  normal                       |   Milestone:  7.0.0                    
Component:  Parser                       |     Version:  svn-releasebranch64      
 Keywords:  base name, prefix, basename  |    Platform:  All                      
      Cpu:  All                          |  
-----------------------------------------+----------------------------------

Comment(by zarch):

 Replying to [comment:12 wenzeslaus]:
 > Replying to [comment:11 zarch]:
 > > Replying to [comment:10 annakrat]:
 > > > Map names can't have this weird characters, check
 `G_legal_filename`.
 > > > I still think '`__`' is the best option.
 > >
 > > Yes, I know... But we can always change what is considered legal and
 > > what is not...
 > >
 > I would not risk anything what is non-ASCII.

 Just for the record this are ASCII characters » (175), ■ (254)...

 > Moreover, it might be a good idea to avoid also all characters which
 > has some meaning or must be escaped/quoted in various command lines
 > or SQL. These include `(){}[]:.|$!&*`.

 Works fine with SQL, and has not special meaning elsewhere, and so far it
 is working quite well also in my bash scripts without problems.

 {{{
 $ sqlite3 /tmp/temp»db.sqlite
 SQLite version 3.7.11 2012-03-20 11:35:50
 Enter ".help" for instructions
 Enter SQL statements terminated with a ";"
 sqlite> CREATE TABLE my»table (cat INTEGER PRIMARY KEY, my»col INTEGER);
 sqlite> INSERT INTO my»table (cat, my»col) VALUES (1, 1234);
 sqlite> SELECT * FROM my»table;
 1|1234
 }}}

 > Perhaps one underscore is enough.

 I don't think so, a single underscore is too common, it is too prone to
 casual errors.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2136#comment:14>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list