View Single Post
Old 10-07-2020, 12:02 AM   #1
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
Escaping '.' in hierarchical browser tags

Hi All,

I have some custom fields I display in the tag browser. These fields have their values presented hierarchically (love this feature), but some of the the strings in the hierarchy contain periods. For instance, I might have something like "Software.GIMP 2.8.3"

Periods, of course, are used as the level delimiters in the tag hierarchy. As a result, I get
  • Software
    • GIMP 2
      • 8
        • 3

This is mostly not horrible, but does not suit my purpose ideally. Is there a way to escape the '.' so it is not treated as a delimiter, or to change the delimiter character to something else?

I did try a few obvious options.
  • Doubling up the '.': "Software.GIMP 2..8..3" makes the parser unhappy and the entire thing is presented non-hierarchically (i.e. exactly as written).
  • Escaping with '\': "Software.GIMP 2\.8\.3" does parse reasonably, and gets presented with levels "Software", "GIMP 2\", "8\", "3".
  • Wrapping the entire string or substrings with '"' or "'" or various sorts of braces and brackets... all are treated as normal characters and they show up in the (parsed and hierarchical) strings.
kjdavies is offline   Reply With Quote