[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [stellation-res] Database location specifier
|
Jonathan,
Based on a quick Google search:
Windows filename characters:
Legal: A-Z 0-9 $#&@!()-{}'`_~ and the space
Illegal: |<>\^+=?/[]";,* plus control characters
Linux:
Characters often recognized as metacharacters by Linux shells:
* ? [ ] " ' ` \ $ ; & ( ) | ^ < > newline space tab
So -- taking the intersection of both sets (more or less):
| <> \ ^ ? [] " ; *
Checking the man page for bash (Bourne-Again shell)
yields the following:
1. "Enclosing characters between single quotes preserves
the literal value of each character within the quotes."
2. "Enclosing characters between double quotes preserves
the literal value of each character within the quotes, with
the exception of $ (dollar sign) ` (backtick) and \
(backslash)."
Since single quote is a legal Windows filename character,
I propose:
a) Use ; (semicolon) as the delimiter within a database locator.
b) Double-quote the entire locator to force command-line processors
to process the locator as a single entity.
Thus:
"This;is a complete;locator;in five;parts."
Thoughts?
- Jim
At 07:10 AM 4/19/2003, Jonathan Gossage wrote:
Supporting Firebird has introduced a significant problem into Stellation.
The problem arises because we manage database location information as a
string with multiple pieces of information delimited with ':' separators.
This works fine for all databases other than Firebird that we have
encountered so far. However, Firebird requires the specification of a full
path to the file that contains the database.
On Linux this does not represent a problem, but on Windows it is. Since the
':' character is a very common character in Windows file paths, we have
problems parsing location strings for Firebird locators since the ':' is
mis-interpreted by our parsing routines. Escaping the ':' character does not
appear to be a good option since the conventional escape character '\' is
again a common part of every Windows based file path.
I had tentatively suggested using a '+' as the separator but it turns out
that this is also a valid character in Windows path names.
It seems to me that the only robust solution is to assemble the location
information from separate properties rather than encoding it in a single
string. However this involves some fairly substantial code modifications at
a time when we are trying to get an alpha release out.
To summarize, the options seem to be the following for the alpha release.
1. Do not support Firebird on Windows. This would effectively eliminate
Windows as a supported environment
for Stellation since no other database has been extensively tested with
the current code base.
2. Continue with the current support using the '+' as the location
separator. This would have the limitation that any Windows based Firebird
database could not have a '+' character in it's path.
3. Rewrite the support to assemble the location information from separate
options. As part of the revision of configuration management that I was
undertaking, this would have been a automatic by-product but that work is
too substantial to include in the alpha release and any lesser
implementation is still non-trivial.
Thoughts?
Regards
Jonathan Gossage
_______________________________________________
stellation-res mailing list
stellation-res@xxxxxxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/stellation-res
--------------------------------------------------------------------
Jim Wright, IBM T.J. Watson Research Center
*** The Stellation project: Advanced SCM for Collaboration
*** http://www.eclipse.org/stellation
*** Work Email: jwright@xxxxxxxxxxxxxx ------- Personal Email:
jim.wright@xxxxxxx