rhapdog wrote:May I assume the only difference between Nocase and NOT Nocase is whether or not small and capital letters of the same kind (A, a) can be on the same line?
This is the main difference regarding sorting the words and where the words can be listed within a color group. There are others features depending also on
Nocase like auto-completion and auto-correction. Let's take a look on following example (from javascript.uew):
- Code: Select all
ASCIIToUTF8 ASCIIToUnicode
UTF8ToASCII
ansiToOem
ueReOn unicodeToASCII unixMacToDos unixReOn
Without
Nocase in first line the listing is correct. With
Nocase all words starting with a lowercase characters would not be highlighted correct.
With
Nocase present in first line following works:
- Code: Select all
ansiToOem ASCIIToUTF8 ASCIIToUnicode
UTF8ToASCII ueReOn unicodeToASCII unixMacToDos unixReOn
as well as this too:
- Code: Select all
ansiToOem
ASCIIToUTF8 ASCIIToUnicode
ueReOn unicodeToASCII
UTF8ToASCII unixMacToDos unixReOn
But without
Nocase in first line the words in second line and the 2 words starting with lowercase
u in fourth line would not be highlighted correct.
Regarding sorting of words with underscores:
It is not absolutely necessary to get the same strictly ASCII/ANSI table related sorted as UltraEdit does with my macro. But perhaps you can define flags as parameters on sort function to get underscore not being ignored (or interpreted like a space character) on sort.
What you should test with built-in sort function is if it uses a local sort. As wordfiles can contain not just words with ASCII characters, but also with ANSI characters, a local sort taking the local language rules of the user of the application into account could produce wrong result. For example following German word list:
- Code: Select all
Arbeit Ast
arbeiten
Äste
ähnlich
That is the word list with a case sensitive sort strictly according to ANSI as required by UltraEdit with
Nocase not present in first line. With
Nocase the words must be listed:
- Code: Select all
Arbeit arbeiten Ast
Äste
ähnlich
My SortLanguage macro produces
- Code: Select all
Arbeit arbeiten Ast
ähnlich Äste
which is not correct and resulting in
Äste being not highlighted correct. I ignored that failured in sorting algorithm in my macro set to do not make it more complicated then necessary for most wordfiles and slow down the macros. But you can take that into account.
Nocase is evaluated by UltraEdit only for [A-Za-z], not for special local letters.
A case sensitive local sort for German words would result in
- Code: Select all
Arbeit Ast Äste
ähnlich arbeiten
as Ä = A and ä = a.
A case insensitive local sort for German words would result in
- Code: Select all
ähnlich Arbeit arbeiten Ast Äste
as Ä = ä = A = a.
I'm quite sure that words starting with a character with a decimal value greater 127 are very rare in wordfiles. I don't have anyone in any of my wordfiles. There are only 20 *.uew files on IDM server containing non ASCII characters. Just 5 of time contain an ANSI character at beginning of a word. 4 of those 5 wordfiles contain just
¬ as word to highlight, the fifth file (ue-oaw.uew) contains several strings starting with
«