|
Chaz Longstaff
Registered User
Join date: 11 Oct 2006
Posts: 685
|
12-12-2007 18:43
I am using a (timed) listen to capture what someone says in chat to a string, then http requesting it *out* via post to an RL database.
What they say could be anything (though obviously I hope it's related to whatever question is being asked.)
Let's say they say: Bûche de Noël
two accents on it.
if I llEscapeURL it, it arrives as (B%C3%BBches de No%C3%ABl)
if i don't, it arrives as (Bûches de Noël)
In both instances, that's how it's coming in before I even touch it, so that's how it's coming out of SL.
Is there any way to win on this? More than pleased to have some painfully obvious function pointed out to me such as llBeKindToAccents(string mystring).
*p.s. bear in mind as well that I have no idea what they are going to say, if there are going to be accents or where they are going to occur, if there are any, so anything that requires me giving special treatment to random odd characters probably isn't of any utility.
|
|
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
|
12-12-2007 23:47
The problem seems to be the character encoding. I guess, you're using PHP to store the string? try using the following command: $save = rawurldecode($string_thats_sent_from_sl);
echo htmlentities($save);
The «rawurldecode»-command converts the string that you encoded with llEscapeURL back to «normal» characters... If this doesn't work, you might try: $save = utf8decode(rawurldecode($string_thats_sent_from_sl));
echo htmlentities($save);
I'm not sure, but I assume that SL uses utf8 as character-encoding - so you might need to convert this, too... hth...
|
|
Chaz Longstaff
Registered User
Join date: 11 Oct 2006
Posts: 685
|
12-13-2007 11:13
Ah thanks Hakuri, decoding on my end cleaned it up nice. I'm being lazy and posting it to an IBM Domino database so I can trigger a bunch of server-side agents afterward, but there is a similar short command for decoding.
|