 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
fbegin Guest
|
Posted: Wed Aug 13, 2003 4:02 pm Post subject: Sorting strings in french |
|
|
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
|
Posted: Wed Aug 13, 2003 4:26 pm Post subject: Re: Sorting strings in french |
|
|
| 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
|
Posted: Thu Aug 14, 2003 12:40 pm Post subject: Re: Sorting strings in french |
|
|
"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
|
Posted: Thu Aug 14, 2003 7:03 pm Post subject: Re: Sorting strings in french |
|
|
| 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 |
|
 |
|
|
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
|
|