Well if the String has Encoding NIL then it is invalid for such comparision until you Define its encoding with DefineEncoding. (And remember you have to define it what it actually is, since DefineEncoding is a promise of what it is, false promise is no good). So if you for example know its UTF-8 data then you define it as UTF-8.

Björn

----- Original Message ----- From: "Maarten de Vries" <[EMAIL PROTECTED]>
To: "REALbasic NUG" <[email protected]>
Sent: Tuesday, May 16, 2006 1:47 PM
Subject: Re: Compare 2 strings of differant encodings


Yeah, I tried that, but since one of the strings has encoding nil, that
isn't possible. Atleast it didn't work. I did string2=
string2.ConvertEncodings(string1.Encoding), I aslo tried it the other way
around, but one string still had UTF-8 and the other still NIL.

Thanks,
Maarten


On 16/05/06, Björn Eiríksson <[EMAIL PROTECTED]> wrote:

Convert String 2 to the same encoding as String 1, then compare String 1
to
the Converted string

Björn

----- Original Message -----
From: "Maarten de Vries" <[EMAIL PROTECTED]>
To: "REALbasic NUG" <[email protected]>
Sent: Tuesday, May 16, 2006 5:54 AM
Subject: Compare 2 strings of differant encodings


Hi,

I've got 2 strings of different encodings, and I need to compare them case
sensitive (with StrComp, mode 0). But they aren't the same even when they
are the same. I gues that is because of the encoding. One of them has
UTF-8
and the other has NIL. I can't change the encoding with the string that
has
NIL. I guess that it does have an encoding, but it's unknow to realbasic.
But the weird thing is that both strings are made inside realbasic. So,
how
should I compare them, or what should I do before I compare them?

Maarten
_______________________________________________
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>


_______________________________________________
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>

_______________________________________________
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>


_______________________________________________
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>

Reply via email to