On Mar 24, 2006, at 2:31 PM, Christian Leicht wrote:
Hello everybody,
iam beginning a project that sends text via a httpsocket to PHP and
MySQL. Then results came back MySQL -> PHP -> Httpsocket - ListBox
The Text is most ("öäü and #!"§") code from other programming
languages and other sources.
Now i have the problem with the encoding of this text and also a
delimiter for the NthField(content,"????",1) function.
Witch char set do you mostly use and what is the best chars for
delimiters ?
Please Help me !
Christian
Well, I mostly use UTF-8, but I think that you'll want to use, in RB,
whatever your source material's encoding is...but I say this without
a full understanding of the problems you're having or what you're
doing...
A good character for use as a delimiter is any character which isn't
in the text you are trying to process. I usually like to keep it
simple and separate columns with \t (tabs) and rows with \n
(newlines). But that's no good if your source text contains tabs or
newlines. Or, to use your above example, you wouldn't want to try to
split your source text using #, because there are #s in your source
text and it would throw off your parsing.
You could also use a combination of characters, if need be. For
example, sometimes if tabs and newlines aren't an option, I'll use ^^
and ### as separators, because it's very unlikely that I'll have 2 ^s
or 3 #s in a row in my course text.
I guess what I'm saying is, outside of tabs and newlines (for
cleanliness when reading as plain text), I'm not sure that there is a
"best" character to use. I think it's pretty much specific to the
source text. But, as I said, I'm not quite positive that I'm
answering your question.
HTH
Ian_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>