func EscapeFilename(filename string) string {
	if len(filename) == 0 {
		return filename
	}
	switch filename[0] {
	case '_', filenameEscapeChar:
		return string(filenameEscapeChar) + filename
	}
	return filename
}
// EscapeFilename and UnescapeFilename convert filenames to legal PouchDB
// representations. In particular, this means non-ASCII and special characters
// are URL-encoded, and leading '_' characters as well, as these upset PouchDB.
// Any '_' characters found elsewhere in the filename are left alone, to
// preserve a few bytes of space (woot!).
EscapeFilename and UnescapeFilename convert filenames to legal PouchDB
representations. In particular, this means non-ASCII and special characters
are URL-encoded, and leading '_' characters as well, as these upset PouchDB.
Any '_' characters found elsewhere in the filename are left alone, to
preserve a few bytes of space (woot!).
// EscapeFilename and UnescapeFilename convert filenames to legal PouchDB // representations . In particular this means non - ASCII and special characters // are URL - encoded and leading ' _ ' characters as well as these upset PouchDB . // Any ' _ ' characters found elsewhere in the filename are left alone to // preserve a few bytes of space ( woot! ) .
func EscapeFilename(filename string) string {
	if len(filename) == 0 {
		return filename
	}
	switch filename[0] {
	case '_', filenameEscapeChar:
		return string(filenameEscapeChar) + filename
	}
	return filename
}
func EscapeFilename ( filename string ) string { if len ( filename ) == 0 { return filename } switch filename [ 0 ] { case '_' , filenameEscapeChar : return string ( filenameEscapeChar ) + filename } return filename }
EscapeFilename and UnescapeFilename convert filenames to legal PouchDB
representations.
EscapeFilename and UnescapeFilename convert filenames to legal PouchDB representations .