string that will sort after all strings of Roman letters.

A

Academia

I want a string of characters that will sort after all strings of Roman
letters.

Something that will display using a font like the one this note is written
with.

Is there such a thing?

I tried using a string starting with { because in ASCII it comes after the
letters but that sorts before the letters.

Can you help?


thanks


ps

I tried to state this so I wouldn't get replies about the many cultures,
alphabets, etc.

I'm talking simple English Last names as strings before the special string.
 
C

Cor Ligthert[MVP]

Hi,

You are not writing in Roman characters so it is in fact impossible to
answer your question in my idea. First try out what are Roman characters and
tell us what you mean. For sure they are not used in the English language.

As well are it not the characters I see in this message. Everyone has his
own font settings which change the way a character is showed.

Roman characters are/were used in Latin. Probably you mean the standard
characters (26) as used in most North/West Europe languages.

Because that you don't want to hear about cultures, is your question the
same as a question like how to eat a Coke but you dont't want to hear about
drinking.

However you can reach your goal. You write as some people who comes from a
country where English is standard spoken however for sure not an
Englishman/woman.

Therefore if you don't want to use cultures convert your characters to bytes
and delete the first bit of that. Then you have real ASCII and can sort it
like that (however there are still more characters in that). If that is not
enough than filter all the bits from the byte that does not fullfil that.
Not that difficult to do, it is the same way as it was done half a century
ago.

Cor
 
A

Andrew Morton

Academia said:
I want a string of characters that will sort after all strings of
Roman letters.

Something that will display using a font like the one this note is
written with.

Is there such a thing?

I tried using a string starting with { because in ASCII it comes
after the letters but that sorts before the letters.

I think you want to see the help for String.CompareOrdinal and perhaps
Array.Sort using a user-supplied IComparer.

Andrew
 
A

Academia

I looked at that .
Maybe I can ask it differently:
How can I find the numeric values of the various character objects that can
be in the strings I'm using. These strings come from an English US .TXT
file.

I need to find a character that has a bigger value than Thanks "z"

Thanks
 
A

Academia

Maybe I can ask it differently:
How can I find the numeric values of the various character objects that can
be in the strings I'm using. These strings come from an English US .TXT
file.

I need to find a character that has a bigger value than Thanks "z"

Thanks
 
A

Academia

Well then I'm confused. VS2005 help has ASCII Table of codes and { is 123
(7D) but when the ComboBox sorts the { shows up at the top of the list
instead of the bottom.

I understand that inside the code they are Unicode but don't they sort the
same as ASCII.

Do I have to do as you suggest below some how?


Thanks for the help
 
A

Academia

I read that once. I'd have to spend sometime to understand it completely but
I don't think I need to know all that.

ASCII would do just fine for what I need.

In the site I saw how to explictly set the StringComparison value but not
kow to make the combobox use a given value.

Is there some system wide parameter I can set that would make all sorts
default to StringComparison.Ordinal (I believe that is the value I need)?

Thanks for pointing out the site, I'll spend more time studying it ,out of
curiosity, but for my application only ASCII is needed. Or maybe I should
say: only en-us is all I need - I don't understand this enough to know the
difference yet.

Thanks again
 
A

Academia

Cor Ligthert said:
Hi,

You are not writing in Roman characters so it is in fact impossible to
answer your question in my idea. First try out what are Roman characters
and tell us what you mean. For sure they are not used in the English
language.
Is "Latin characters" the correct nomenclature?

Thanks
 
A

Academia

Cor Ligthert said:
Hi,

You are not writing in Roman characters so it is in fact impossible to
answer your question in my idea. First try out what are Roman characters
and tell us what you mean. For sure they are not used in the English
language.
Or is this the correct reference:

Roman characters used in English and Western European languages
 
A

Academia

I ran a little test:

For i As Integer = 0 To 255

ComboBoxQ.Items.Add("\" & ChrW(i) & "\" & i.ToString("000") & "\")

Next



Shows that the default sort places "z" last.

There is no character less that 256 that follows "z" in the default sort
method of the ComboBox.

Is there a way to have the ComboBox sort per ASCII short of using:

Implements System.Collections.IComparer?





Thanks
 
C

Cor Ligthert[MVP]

Academia.

I think that you are meaning as I wrote the 26 base characters in modern
western Europe languages. Although I saw that you was meaning in lower and
upercase which extend that to 52. Withouth that telling that everybody would
think that it would be only upercase characters. As you look at the bit
structure in ASCII then you can see how easily that is to filter.

By the way. England is a Western Europe country, therefore English is a
Western Europe language. (All the Western Europe languages characters are in
characterset 1252)

Cor
 
A

Armin Zingler

Academia said:
I ran a little test:

For i As Integer = 0 To 255

ComboBoxQ.Items.Add("\" & ChrW(i) & "\" & i.ToString("000") & "\")

Next



Shows that the default sort places "z" last.

I guess you set ComboBoxQ.sorted = True
There is no character less that 256 that follows "z" in the default
sort method of the ComboBox.

Is there a way to have the ComboBox sort per ASCII short of using:

Implements System.Collections.IComparer?

Using the Combobox probably not, but you can put the items into an array,
sort it using the comparer of your choice, then put the items into the
Combobox (while having ComboBoxQ.Sorted = False).

The link Jack provided seems to be very useful for this.


Armin
 
A

Academia

Cor Ligthert said:
Academia.

I think that you are meaning as I wrote the 26 base characters in modern
western Europe languages. Although I saw that you was meaning in lower and
upercase which extend that to 52. Withouth that telling that everybody
would think that it would be only upercase characters. As you look at the
bit structure in ASCII then you can see how easily that is to filter.

By the way. England is a Western Europe country, therefore English is a
Western Europe language. (All the Western Europe languages characters are
in characterset 1252)


Good. Now I know the words to use if I need to ask another question.

thanks
 
A

Academia

Armin Zingler said:
I guess you set ComboBoxQ.sorted = True


Using the Combobox probably not, but you can put the items into an array,
sort it using the comparer of your choice, then put the items into the
Combobox (while having ComboBoxQ.Sorted = False).

The link Jack provided seems to be very useful for this.


I was looking for how-to that related to the ComboBox and missed the idea of
sorting outside of it before adding the items.


Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top