Ian R schrieb:
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...
Hello Ian, i´m not shure how should i set the encoding to UTF-8 correct.
For example:
I send a form like this
form.value("funktion") = "main_update_input"
form.value("titel") = Window1.EditField2.Text
form.value("textcontent") = Window1.EditField1.Text
form.value("aktuellegruppe") = aktuellegruppe
form.value("aktuellerDatensatz") = aktuellerDatensatz
form.Value("aktuellercontenttype") = aktuellercontenttype
Window1.HTTPSocketDetail.setFormData form
Window1.HTTPSocketDetail.post main_script_url
Must i here encode every variable to UTF-8 ?
form.value("funktion") = DefineEncoding("main_update_input"
,encodings.UTF8)
form.value("titel") = DefineEncoding(Window1.EditField2.Text
,encodings.UTF8)
form.value("textcontent") = DefineEncoding(Window1.EditField1.Text
,encodings.UTF8)
form.value("aktuellegruppe") = DefineEncoding(aktuellegruppe
,encodings.UTF8)
form.value("aktuellerDatensatz") = DefineEncoding(aktuellerDatensatz
,encodings.UTF8)
form.Value("aktuellercontenttype") =
DefineEncoding(aktuellercontenttype,encodings.UTF8)
Window1.HTTPSocketDetail.setFormData form
Window1.HTTPSocketDetail.post main_script_url
An on the PHP side, for example:
$titel = utf8_encode ( $titel );
$aktuellercontenttype = utf8_encode($aktuellercontenttype);
and so on ...
$result = mysql_query ("INSERT INTO repository_main
(gruppe,contenttype,titel,textcontent,date) VALUES
('$aktuellegruppe','$aktuellercontenttype','$titel','$textcontent',now())");
At reading the data from mysql to PHP -> backwards
And reading the content from HTTPSocket like this?
utf8content = DefineEncoding(content, encodings.UTF8)
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.
Yes, i think multi sign´s is the best way for me. Like ### ore ^^^
Thanks
Christian
_______________________________________________
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>