BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sorting strings in french

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internationalization
View previous topic :: View next topic  
Author Message
fbegin
Guest





PostPosted: Wed Aug 13, 2003 4:02 pm    Post subject: Sorting strings in french Reply with quote




Hi, anyone know how i could sort strings written in french and get the sort correct since in french you have special caracters like e,ê,é,è witch come after d and before f

Ty all

Fbegin
Back to top
Leo Saguisag (Borland)
Guest





PostPosted: Wed Aug 13, 2003 4:26 pm    Post subject: Re: Sorting strings in french Reply with quote



Quote:
Hi, anyone know how i could sort strings written in french and get the
sort correct since in french you have special caracters like e,$B!&!&!&(Bwitch

come after d and before f

The sort orders used are dependent on your locale settings. If you are
running in a French locale, you should get a French sort order.



Back to top
fbegin
Guest





PostPosted: Thu Aug 14, 2003 12:40 pm    Post subject: Re: Sorting strings in french Reply with quote




"Leo Saguisag (Borland)" <lsaguisag (AT) nospam (DOT) borland.com> wrote:
Quote:
Hi, anyone know how i could sort strings written in french and get the
sort correct since in french you have special caracters like e,$B!&!&!&(Bwitch
come after d and before f

The sort orders used are dependent on your locale settings. If you are
running in a French locale, you should get a French sort order.


Well i tried that and it does'nt work is there in delphi sorting algorythms i could use? The basic problem is the following. I'm trying to sort node in a treeview and the primary sorting key is a string (a name) that can contain special french characters. It's obvious that i cant use simple string compare to sort. So anyone have any ideas?


I'm using xp pro, locale in os is canada, language is french canadian, keybord is french canadian . Project in delphi uses language french canadian (ver info).

Thanks

FBegin


Back to top
Leo Saguisag (Borland)
Guest





PostPosted: Thu Aug 14, 2003 7:03 pm    Post subject: Re: Sorting strings in french Reply with quote

Quote:
Hi, anyone know how i could sort strings written in french and get the
sort correct since in french you have special caracters like e,$B!&!&!&(B
witch
come after d and before f

The sort orders used are dependent on your locale settings. If you are
running in a French locale, you should get a French sort order.


Well i tried that and it does'nt work is there in delphi sorting
algorythms i could use? The basic problem is the following. I'm trying to

sort node in a treeview and the primary sorting key is a string (a name)
that can contain special french characters. It's obvious that i cant use
simple string compare to sort. So anyone have any ideas?

You should be using the Ansi functions to take advantage of the current
locale settings. For example, in SysUtils, you have AnsiCompareStr and
AnsiCompareText.

If you really want to implement a custom sorting algorithm for a TreeView,
there is a TCustomTreeView.CustomSort method that you can use.



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internationalization All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.