|
-
May 21st, 2000, 09:56 PM
#1
Thread Starter
Addicted Member
Is there a standard character for separating text strings saved as a single text file. I have nearly finished my first app, and would like to make sure the saved files can be used by others, if necessary.
The saved files are individual Rich Text box contents (and formatting) saved in a file, with each of the 'fields' separated by the characters "~q~" (no reason behind the selection, its just unlikley the user will type these keys in this order).
Is there a standard format for separating these 'fields' that would be useful if, for instance somewone wanted to read the 'fileds' into a database? Some of the fields will already contain users "tabs", "commas" etc.
Thanks?
-
May 22nd, 2000, 12:23 AM
#2
Check this out.
I used to work in this area.
If tab delimiting is out of the question, then there are 2 other options:
Use qualified Comma-delimiting
or
Fixed width format...
Examples:
Qualified Comma delimiting looks like this
"Mr","Joe","Bloggs","23 Madison Square Gardens" ...
Fixed width uses no delimiters at all, like this
"Mr________Joe___________Bloggs______________23 Madison..."
(the underscores above represent a normal space)
Note for the latter, you need to know the exact length of each of the fields and implement this when reading.
the reason for using the double quotes is so that the user's commas will not be mistaken for delimiters.
If you want some more advice mail me.
If i were you, i would go for the "," method, because you can use the Split() and Join() functions.
[Edited by wossname on 05-22-2000 at 07:25 PM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|