Template talk:FFFF

From Wiktionary, the free dictionary
Jump to navigation Jump to search
This is the talk page for a deleted page. It is being kept for historical interest.

Documentation[edit]

Usage[edit]

Synopsis[edit]

At [[adăpost]]:

===Noun===
{{ro-noun|gend=n|pl=adăposturi|sort=ada{{FFFF}}post}}

When to use[edit]

In certain languages' writing systems, there exist additional letters inserted into an otherwise translingual alphabet, such as the Latin or Cyrillic alphabet. For example, in Spanish, the letter ñ comes between the letters n and o, such that (deprecated template usage) piña comes between (deprecated template usage) pinto and (deprecated template usage) piojo in alphabetical order. By default, MediaWiki won't use this correct order when listing members of a category; but it does allow an entry's "sort key" to be specified, controlling the entry's placement. (If no sort key is specified, the entry's title is used.) In an entry for a Spanish word containing ñ, the sort key should be the headword, except replacing all instances of ñ with n{{FFFF}}.

Note that this approach doesn't work for all languages; it depends on the language's traditional alphabetization scheme. In some languages, such as Swedish, the additional letters are added to the end of the alphabet; and in other languages, such as French, diacritics are mostly ignored in the traditional alphabetization scheme (such that (deprecated template usage) des and (deprecated template usage) dès are mostly equivalent: (deprecated template usage) dès follows (deprecated template usage) des, but comes before (deprecated template usage) dessiner and (deprecated template usage) detenir). Languages in which it does work include Mongolian, Romanian, Spanish, and Turkish.

How it works[edit]

{{FFFF}} inserts a non-Unicode character, which MediaWiki sorts after all basic Unicode characters (including all Latin and Cyrillic letters); so, it's kind of like inserting a z(deprecated template usage) pinto comes before (deprecated template usage) pinza comes before (deprecated template usage) piojo — but a bit more robust.

Discussion[edit]

~[edit]

While I definitely appreciate the clever funkiness of this solution, wouldn't it work just as well to use a tilde (which is the last ASCII glyphic character)? (For Cyrillic characters that would work less well — for example, we'd have to replace Ө with П~ instead of with О~ — but there's probably an easier character to use for that, too.) Relatedly, the name of this template describes its implementation rather than its functionality, which strikes me as sub-ideal; if we do want to go the template route, I think it would be better to have e.g. {{ro-ă}}, which would expand to a. —RuakhTALK 19:29, 16 September 2008 (UTC)[reply]

No one said I was best at naming templates. I tend to think rather techy. Anyway, &#XFFFF; wouldn't work on its face because that's an escape code for HTML display. For the collation to actually work, it needs to be the raw character which itself collates at U+FFFF. ...or am I misunderstanding what you're talking about? And yes, tildes might work for Latin-only. In fact, U+FFFF works only for UTF-16 (where >= U+10000 is encoded using surrogates), or if the alphabet is entirely <= U+FFFD. If an alphabet with >= U+10000 is used, inevitably a different reservedly unused character would have to be used. Oh, and thank you for reconstructing the usage notes in the talk page—I very much appreciate your effort. ^_^ - Gilgamesh 19:47, 16 September 2008 (UTC)[reply]
Don't worry, the whole method is a crock. See RFD. The FFFx characters cannot and should not be used; the correct, and s/w engineering standard solution and best practice is to insert the desired preceding sort letter or other sub-key. No template needed or wanted. Robert Ullmann 23:48, 16 September 2008 (UTC)[reply]

Just passing by...[edit]

Out of interest, is it completely impossible to sort these by convention. I have scripts here for generating the indices that use the convention of the language to determine which order to sort letters with diacritics (writing a method to generate a sort-key from a string isn't too hard if you know what the conventions to be used are). I do know that for some languages with double-letters, like Hungarian, it is impossible for a computer to guess completely accurately how to sort the word (as cs looks like cs etc.) but I would have thought that people would be more consistent with sorting the diacritics. Conrad.Irwin 00:09, 17 September 2008 (UTC)[reply]

As you note, it is usually possible to sort languages automatically; and I *suspect* that given any particular language, the people who produce dictionaries and such know how to do it. (Just like the typesetting systems I used in the '70s could hyphenate any word: they had about a dozen rules, and then a list of only a handful of exceptions.) Our general problem is doing things by-language-section, which we can't at the current MW state. We can't parse things out in templates, and can't set up a DEFAULTSORT for the entry, although we might get close in a lot of cases. 'Bots could certainly gen up sort keys for specific uses. Robert Ullmann 00:34, 17 September 2008 (UTC)[reply]