{
// l4s = small kana sensitivity, l4t = mark type,
// l4k = katakana flag, l4w = kana width sensitivity
- int l1, l2, l3, l4s, l4t, l4k, l4w, l5;
byte [] l1b, l2b, l3b, l4sb, l4tb, l4kb, l4wb, l5b;
- int level5LastPos;
+// int level5LastPos;
string source;
+ int l1, l2, l3, l4s, l4t, l4k, l4w, l5;
+ int lcid;
+ CompareOptions options;
bool processLevel2;
bool frenchSort;
bool frenchSorted;
- int lcid;
- CompareOptions options;
public SortKeyBuffer (int lcid)
{
public void Reset ()
{
l1 = l2 = l3 = l4s = l4t = l4k = l4w = l5 = 0;
- level5LastPos = 0;
+// level5LastPos = 0;
frenchSorted = false;
}
AppendBufferPrimitive ((byte) ((offsetValue / 64) + 0x80), ref l5b, ref l5);
AppendBufferPrimitive ((byte) (offsetValue % 64 * 4 + 3), ref l5b, ref l5);
- level5LastPos = l2;
+// level5LastPos = l2;
// sortkey value
AppendBufferPrimitive (category, ref l5b, ref l5);
public SortKey GetResult ()
{
- if (frenchSort && !frenchSorted) {
+ if (source.Length == 0)
+ return new SortKey (lcid, source, new byte [0], options, 0, 0, 0, 0, 0, 0, 0, 0);
+
+ if (frenchSort && !frenchSorted && l2b != null) {
int i = 0;
for (; i < l2b.Length; i++)
if (l2b [i] == 0)