473,720 Members | 2,687 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 3077


"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
2533
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
1717
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
4762
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 bring it up, rather it brings to the first record (no matter how many times i try going to that...
3
1459
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
2260
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? http://www.postgresql.org/docs/faqs/FAQ.html
1
3714
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 online. Plz....Plz..Plz...
9
2612
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 always end with a number. When I retrieve them from the database I use "ORDER BY id" to get them...
3
1653
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 code is For first page: <%userdetails=session("userdetails")
5
4951
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: http://www.jaredmoore.com/tablesorter/docs/salestable.html Here is some jquery js that I think...
0
8834
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8727
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9365
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9127
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9056
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5973
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4483
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3186
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
3
2127
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.