PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

DirectorySearcher sort order for european characters

 
 
=?Utf-8?B?aGFzcyBjaGFwbWFu?=
Guest
Posts: n/a
 
      26th Jan 2004
H

We are trying to get a aspx page to sort members but it treats swedish characters wrongly. How do we get it to sort according to european sort orders

Thank

/hass
 
Reply With Quote
 
 
 
 
mikeb
Guest
Posts: n/a
 
      26th Jan 2004
hass chapman wrote:

> Hi
>
> We are trying to get a aspx page to sort members but it treats swedish characters wrongly. How do we get it to sort according to european sort orders?
>
> Thanks
>
> /hass



I'm not very with the DirectorySearcher class, so I'm not sure if you
are expecting the results from the FindAll() method to be already sorted
or not, but in any case you have several options, including:

- sort the strings you get using a SortedList - if you create your
SortedList instance using "new SortedList( null)", then the strings you
add into the sorted list will be compared using the String class'
CompareTo() method which uses the current culture information to perform
the comparison.

So as long as you set the current culture to the user's culture, just
drop the strings you want sorted into the SortedList, and you're there.

See this for more information:

http://msdn.microsoft.com/library/en...ficculture.asp

--
mikeb
 
Reply With Quote
 
=?Utf-8?B?SGFzcyBDaGFwbWFu?=
Guest
Posts: n/a
 
      27th Jan 2004
Thanks alot, but I have tried this and it doesn't work.

The regional settings on the server are swedish but those on the DC are english, could it be this?

/hass
 
Reply With Quote
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      27th Jan 2004
Yes. The sortorder is determined by the server running the AD service.

Willy.

"Hass Chapman" <(E-Mail Removed)> wrote in message
news:075CBAA0-3A07-4CE3-8B4D-(E-Mail Removed)...
> Thanks alot, but I have tried this and it doesn't work.
>
> The regional settings on the server are swedish but those on the DC are
> english, could it be this?
>
> /hass



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Easter European characters in cmd window.... Highlag Windows Vista General Discussion 4 16th Dec 2007 08:11 AM
Loading data with Japanese characters in an (European) Access Data =?Utf-8?B?RGlldHJpY2ggU2Now6RmZmxlcg==?= Microsoft Access 0 13th Nov 2006 04:14 PM
Pls. reply Sort Data and copy to next coulmn when sort order chang =?Utf-8?B?c2hpdGFsIHNoYWg=?= Microsoft Excel Programming 0 19th Aug 2005 10:29 AM
Sort order for characters & symbols - does anything follow z? =?Utf-8?B?TmVpbCBHb2xkd2Fzc2Vy?= Microsoft Excel Misc 4 5th Aug 2005 05:02 AM
Re: Restrict character set used in forms to West European characters Michael \(michka\) Kaplan [MS] Microsoft Dot NET Framework Forms 0 3rd Jul 2003 03:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:20 PM.