static Dictionary<int, string> ParseAbbreviations (byte [] buffer, int index, int count)
{
var abbrevs = new Dictionary<int, string> ();
int abbrev_index = 0;
var sb = new StringBuilder ();
for (int i = 0; i < count; i++) {
char c = (char) buffer [index + i];
if (c != '\0')
sb.Append (c);
else {
abbrevs.Add (abbrev_index, sb.ToString ());
//Adding all the substrings too, as it seems to be used, at least for Africa/Windhoek
//j == sb.Length empty substring also needs to be added #31432
for (int j = 1; j <= sb.Length; j++)
abbrevs.Add (abbrev_index + j, sb.ToString (j, sb.Length - j));
abbrev_index = i + 1;
sb = new StringBuilder ();
}
}
return abbrevs;
}