473,563 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with Sorting Order, Please

Hello !

I wonder if any one can help me to create a cosomize sorting order (as Macro or added small program
in c++ or c# which does this work) in a Access Database contaning one table only words encoded in
ISO-8859-1

A a B b C c D d E e F f G g H h I i J j
1 2 3 4 5 6 7 8 9 10 11 12
Jh jh K k L l ll M m N n O o P p Q q R r rr S s
13 14 15 16 17 18 19 20 21 22 23 24
Sh sh T t U u V v W w X x Y y Z z
25 26 27 28 29 30 31 32 33 34

There some unique cases in this alphabet that has to be considered while sorting.

a. Letters with diacritical (, , , ). The Unicode numbers for these letters are:

I. Lower cases: ( [U+00E9], [&#233]), ( [U+00ED], [&#237]), ( [U+00DA], [&#250]), (
[U+00F9], [&#249])
II. Upper cases: ( [U+00C9], [&#201]), ( [U+00CD], [&#205]), ( [U+00DA], [&#218]), (
[U+00F9], [&#217])

b. Combined letters which have to be treated as on single letter like (Jh initial case), (jh,
non-initial case), (ll, only non-initial case), (rr, only non-initial case) (Sh initial case) and
(sh, non-initial case),

c. The positions of the letters are marked from 1 to 34 starts from top left to right. This will
help to sort the words according to Kurdish Unified Alphabet. The sorting system needs to consider
the rank of level of priority to place cases in a and b in correct alphabetic position.

Thank you Dilan

Jul 19 '05 #1
2 3056


"D. Roshani" wrote:

Hello !

I wonder if any one can help me to create a cosomize sorting order (as Macro or added small program
in c++ or c# which does this work) in a Access Database contaning one table only words encoded in
ISO-8859-1


[snip]

And why do you think the C++ people can help.
Your question is all about: How do I smuggle a custom comparison function into Access.
So I would start by asking the Access people on how to do that. But that's a different
newsgroup.

--
Karl Heinz Buchegger
kb******@gascad .at
Jul 19 '05 #2
D. Roshani wrote:
Hello !

I wonder if any one can help me to create a cosomize sorting order (as
Macro or added small program in c++ or c# which does this work) in a
Access Database contaning one table only words encoded in ISO-8859-1

A a B b C c D d E e F f G g H h I i
J j
1 2 3 4 5 6 7 8 9 10 11 12
Jh jh K k L l ll M m N n O o P p Q q R r
rr S s
13 14 15 16 17 18 19 20 21 22 23 24
Sh sh T t U u V v W w X x Y y Z z
25 26 27 28 29 30 31 32 33 34
Is this supposed to be a table? If you're going to do this, please do
it in a monospaced font!
There some unique cases in this alphabet that has to be considered while
sorting.

a. Letters with diacritical (, , , ). The Unicode numbers for
these letters are: <snip> b. Combined letters which have to be treated as on single letter like
(Jh initial case), (jh, non-initial case), (ll, only non-initial case),
(rr, only non-initial case) (Sh initial case) and (sh, non-initial case),


Here's how I'd do it.

Define a two-dimensional array of strings or a three-dimensional array
of characters to hold the letters, something like this:

char alphabet[34][2][3] = {
{"A", "a"}, {"B", "b"},
// ...
{"Jh", "jh"}, {"K", "k"}, {"L", "l"},
{"ll", "ll"}, // no initial case form, so repeat
// lowercase form
// ...

};

Now define a comparator function similar to strcmp. Starting with the
beginning of both strings, scan your alphabet array from the end (so
that the compound letters are caught) until you find the entry that your
string begins with. If they differ, return the difference between the
letter indexes. Otherwise, move straight onto the next letter and repeat.

Now, depending on how the data you want to sort is stored, you could use
qsort or write a function to do the sorting based on your comparator
function.

HTH

Stewart.

--
My e-mail is valid but not my primary mailbox. Please keep replies on
on the 'group where everyone may benefit.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2522
by: dont bother | last post by:
This is really driving me crazy. I have a dictionary feature_vectors{}. I try to sort its keys using #apply sorting on feature_vectors sorted_feature_vector=feature_vectors.keys() sorted_feature_vector.sort() #feature_vector.keys()=sorted_feature_vector
3
1707
by: John | last post by:
I am new to c++ programming and i just want to make a program that takes a users name, then converts it to a hex string, then puts it together in a fixed order. An example output would be: Name: John Output: 84721305 this is my generation code so far #include <conio.h>
4
4735
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record onto the bottom of the list (even though it keeps its record number). Also, There are certin names that i click on the list, and it will not...
3
1449
by: Paul T. Rong | last post by:
Hello there, I am making a report using codes bellow (a part of): ------------------------------- Select Case Forms!!TopBoard Dim strGetSQL As String
6
2244
by: Dennis Gearon | last post by:
This is what has to be eventually done:(as sybase, and probably others do it) http://www.ianywhere.com/whitepapers/unicode.html I'm not sure how that will affect LIKE and REGEX. ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? ...
1
3697
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am attach this script files and inq files. I cant understand this error. Please suggest me. You can talk with my yahoo id b_sahoo1@yahoo.com. Now i am...
9
2599
by: Dylan Parry | last post by:
Hi folks, I have a database that contains records with IDs like "H1, H2, H3, ..., Hn" and these refer to local government policy numbers. For example, H1 might be "Housing Policy 1" and so on. For some more insight, not all policies will be prefixed with an "H", an in fact they could be prefixed with *any* letter combination, but they will...
3
1644
by: nagmvs | last post by:
Hi to all I have one table with 6 columns and 20 rows.I want to sort each and every column when i click the column name in the table. for sorting i create one more page.when i click the column name it connect to sorting page and then page will be sorting. like this i wnat to write the code. i wrote some code,but it not working properly.my...
5
4916
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums there are, it crashes. There are currently 6 columns, and I only want 4. How do I remove the last two (discount and date)? Here is a link:...
0
7579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7876
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7630
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7941
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5479
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5201
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3628
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2077
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.