Wrong sorting order for special chars

Hi,

I have a view column sorted in ascending order.

Sorting doesn’t work correctly for the symbol @ (ASCII code 40)

ASCII code of letter A is 41. So A@B.COM should be shown before the view entry AB@C.COM. But currently it shows:

AB@C.COM

A@B.COM

Is there a work around for this?

Regards

Litty Joseph

Subject: Wrong sorting order for special chars

Create a hidden column before the column you’re currently sorting on where you convert each of the characters to the ASCII 3 digit value (you want 041 and 040)

So you’ll get

041040042… for A@B,com

041042041… for AB@C,com

You’d need 3 digits because you don’t want another character with an ASCII value greater than 100 messing the order up.

Subject: RE: Wrong sorting order for special chars

A variation on his suggestion seems reasonable with a view that size. I wouldn’t necessarily convert it to an ASCII value; instead simply use a tilde (which is at the top of the collation sequence). Use something like this in a column:

@ReplaceSubstring( fieldX; “@”; “~” )

Put it in a hidden column if you do not want the user to see it.

Subject: RE: Wrong sorting order for special chars

Hi Stephen, It’s a good idea. Thanks. But this view contains 85k documents, and I need to sync it with a similar Oracle table using LEI. It was strange that Notes and Oracle sorts same text values differently. I did some analysis and found that character set used in Notes and Oracle could be potentially different - which causes this problem. Performance looks like a problem for substituting characters with ASCII code.

Thanks for your help.

Litty Joseph.

Subject: RE: Wrong sorting order for special chars

Yes, I could see that. Let us know if you find something.