|
| FindC returns incorrect results with Unicode 200E, 200F |
 |
Mon, 03 Jul 2006 15:16:34 +020 |
Hi,
it seems that the TDesC::FindC() method does not work correctly when
Unicode left-to-right and right-to-left marks are present in a string,
while TDesC::Find() works fine. I noticed the following with Symbian
8.0a, both in the SDK as well as on a phone:
TUint16 string[] = {0x200E,0x200F,'x',0};
TBuf<40> b = TPtrC(string);
TInt pos = b.FindC(_L("x")); // returns 0
TInt pos2 = b.Find(_L("x")); // returns 2
Apparently the LTR/RTL marks are not counted as "string" characters
during Collate normalization (haven't tried Folding). This behaviour
appears to be at least counter-intuitive to me...
|
| Post Reply
|
|
|
|
|
|
|
|
|
|