Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » How to setup right sorting in my application?
How to setup right sorting in my application? [message #27858] Fri, 06 August 2010 21:05 Go to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

After searching on the forum - question is still here.

How to setup my (Russian) alphabet in application to use right sorting sequence in various controls?

I found LanguageInfo::compare and LanguageInfo::getletterindex, but how to use it?

Please help!!!


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: How to setup right sorting in my application? [message #28021 is a reply to message #27858] Fri, 13 August 2010 11:03 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14105
Registered: November 2005
Ultimate Member
sergeynikitin wrote on Fri, 06 August 2010 15:05

After searching on the forum - question is still here.

How to setup my (Russian) alphabet in application to use right sorting sequence in various controls?

I found LanguageInfo::compare and LanguageInfo::getletterindex, but how to use it?

Please help!!!


I am afraid that russian sorting was not implemented yet.

If you could provide the comparison routine, I will gladly add it.

See CSCZLanguageCompare in LangInfo.cpp.
Re: How to setup right sorting in my application? [message #28055 is a reply to message #28021] Fri, 13 August 2010 21:03 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Excuse me, but perhaps I was misunderstood.

Could two words to tell how to use the LanguageInfo:: compare and LanguageInfo:: getletterindex, what should be their organization and results.

You can quite brief.


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: How to setup right sorting in my application? [message #29266 is a reply to message #28055] Wed, 13 October 2010 19:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14105
Registered: November 2005
Ultimate Member
Quite simple:

"compare" - provide the routine that does the correct ordering of two words (c style returns -1: a<b, 0: a==b, 1: a>b).

"getletterindex" - this is quite specific - in czech language (and perhaps others), there is a "composed letter" "ch" which is conidered a specific letter when e.g. creating indexes of books (hence the name). More over, some letters with/without diacritical markings are considered the same for index purposes. getletterindex thus returns the "letter" the word belongs to.

To provide your own algorithms, simply GetLanguageInfo for required language, replace compare and or getletterindex functions and us SetLanguageInfo for program-wide replacement. (And then send me your compare function so that I can put it into Core Smile


Re: How to setup right sorting in my application? [message #29303 is a reply to message #29266] Thu, 14 October 2010 18:05 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

I think I understood the problem sorting Russian values - some Russian characters U + + accepts as numbers.

Is there somewhere a place where I can specify the value of each character in the alphabet (number / letter / special signs)?


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: How to setup right sorting in my application? [message #29328 is a reply to message #29303] Fri, 15 October 2010 14:32 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14105
Registered: November 2005
Ultimate Member
Sure, in compare.

See, you get two words to compare as wchar pointers. All letters are unicode. Compare them using your language rules and you are done...


Re: How to setup right sorting in my application? [message #29344 is a reply to message #29328] Fri, 15 October 2010 17:25 Go to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

OK. I'll try.

SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Previous Topic: --export-tr does not work
Next Topic: Compile error about ctrllib.t
Goto Forum:
  


Current Time: Fri Nov 01 01:39:25 CET 2024

Total time taken to generate the page: 0.02907 seconds