iso639: replace the name-inclusive search algorithm
...with one that searches the names of all the records, then the codes, rather than all attributes of one record, then the next. (it is not necessarily the final form of this new algorithm, with a further tweak to come in the next commit). this alternate implementation, is just a simple extension of the "normal" (code-only) search algorithm, adding an extra conditional table attribute search, rather than having an entirely different algorithm for name-inclusive searches (which was copied from the old hack this replaced). also, under this new algorithm, ISO-639-1 codes are only compared when len==2, and similarly ISO-639-2 codes are only compared when len==3, saving wasted comparison effort in exchange for some possible more looping. note that name-inclusive searches are only performed by dvdnav, bluray, and esout, and only the first two are relevant with respect to considering any difference in results, since esout assumes 2/3 char language strings are iso-639 codes and thus does not perform a name-inclusive search for them (at the expense of not being able to reach the three letter name records by name). for dvdnav and bluray, this concerns recognising any user specified option values indicating "preferred language" per fc4005c1. -- result differences -- the results given happen to be identical to that of the previous algorithm, both with the current data set, and the updated one in MR 146 ([1]). noting that the table is updated from the data from glibc, maintaining the same order, it should be understood that the results would only be different to the previous algorithm if the table ever had an entry added with a three/two character name that matches (case insensitively) a code from an entry earlier in the table, in which case this new entry would be the match rather than the earlier entry. (name match now always wins rather than first matching record in the list). [1]: !146
parent
58ef2327
No related branches found
No related tags found
Please register or sign in to comment