6 ms·
What has case distinction but is neither uppercase nor lowercase?
- deleted 2y ago[deleted]
- rustcleaner 2y agoFor an intereſting third, deleted caſe of 'S' I preſent to you: ſ (the long-s).
- rustcleaner 2y agoYes my uſe of this caſe is correct.
- dpig_ 2y agoWhat's an ufe? Get out of my cafe.
- pwdisswordfishz 2y agoIt has the advantage that while ſome programming languages feature “class” as a reſerved word, “claſs” almoſt never is, ſo you can uſe that inſtead of a mis-ſpelling.
- lexicality 2y agoPresumably you can also use claß then
- twic 2y agoclaß is much more concise.
- c-linkage 2y agoThe esszet is a ligature of the long ess and a zee. I never understood why Germans "expand" it to double ess.
- Rendello 2y agoRecently they've been able to expand it to (capital) ß, too: https://en.wikipedia.org/wiki/%C3%9F https://en.wikipedia.org/wiki/%C3%9F
- weinzierl 2y ago"In the course of the Second Sound Shift in the 7th and 8th centuries, two different sounds emerged from Germanic /t/ and /tː/ - a fricative and an affricate - both of which were initially rendered with zz. Since Old High German, spellings such as sz for the fricative and tz for the affricate were used to differentiate between them." "The sound written with ss, which goes back to an inherited Germanic /s/, differed from the sound written with sz; the ss was pronounced as a voiceless alveolo-palatal fricative [ɕ], whereas the sz was pronounced as a voiceless alveolar fricative [s]. Even when these two sounds merged, both spellings were retained. However, they were confused because no one knew anymore where an sz had originally been and where an ss had been." https://de.m.wikipedia.org/wiki/%C3%9F https://de.m.wikipedia.org/wiki/%C3%9F
- hinkley 2y agoFlashbacks of 90's era PDF files. I hate you both.
- esnard 2y agoJust scripted something to find them all: U+01C5: Dž (lower dž, upper DŽ) U+01C8: Lj (lower lj, upper LJ) U+01CB: Nj (lower nj, upper NJ) U+01F2: Dz (lower dz, upper DZ) U+1F88: ᾈ (lower ᾀ, upper ἈΙ) U+1F89: ᾉ (lower ᾁ, upper ἉΙ) U+1F8A: ᾊ (lower ᾂ, upper ἊΙ) U+1F8B: ᾋ (lower ᾃ, upper ἋΙ) U+1F8C: ᾌ (lower ᾄ, upper ἌΙ) U+1F8D: ᾍ (lower ᾅ, upper ἍΙ) U+1F8E: ᾎ (lower ᾆ, upper ἎΙ) U+1F8F: ᾏ (lower ᾇ, upper ἏΙ) U+1F98: ᾘ (lower ᾐ, upper ἨΙ) U+1F99: ᾙ (lower ᾑ, upper ἩΙ) U+1F9A: ᾚ (lower ᾒ, upper ἪΙ) U+1F9B: ᾛ (lower ᾓ, upper ἫΙ) U+1F9C: ᾜ (lower ᾔ, upper ἬΙ) U+1F9D: ᾝ (lower ᾕ, upper ἭΙ) U+1F9E: ᾞ (lower ᾖ, upper ἮΙ) U+1F9F: ᾟ (lower ᾗ, upper ἯΙ) U+1FA8: ᾨ (lower ᾠ, upper ὨΙ) U+1FA9: ᾩ (lower ᾡ, upper ὩΙ) U+1FAA: ᾪ (lower ᾢ, upper ὪΙ) U+1FAB: ᾫ (lower ᾣ, upper ὫΙ) U+1FAC: ᾬ (lower ᾤ, upper ὬΙ) U+1FAD: ᾭ (lower ᾥ, upper ὭΙ) U+1FAE: ᾮ (lower ᾦ, upper ὮΙ) U+1FAF: ᾯ (lower ᾧ, upper ὯΙ) U+1FBC: ᾼ (lower ᾳ, upper ΑΙ) U+1FCC: ῌ (lower ῃ, upper ΗΙ) U+1FFC: ῼ (lower ῳ, upper ΩΙ)
- Rendello 2y agoThe other day I posted similar tables/scripts for related character properties and there was some good discussion: https://news.ycombinator.com/item?id=42014045 https://news.ycombinator.com/item?id=42014045 - Unicode codepoints that expand or contract when case is changed in UTF-8: https://gist.github.com/rendello/d37552507a389656e248f3255a618127 https://gist.github.com/rendello/d37552507a389656e248f3255a6... - Unicode roundtrip-unsafe characters: https://gist.github.com/rendello/4d8266b7c52bf0e98eab2073b38829d9 https://gist.github.com/rendello/4d8266b7c52bf0e98eab2073b38... For example, if we do uppercase→lower→upper, some characters don't survive the roundtrip: Ω ω Ω İ i̇ İ K k K Å å Å ẞ ß SS ϴ θ Θ I'm using the scripts to build out a little automated-testing generator library, something like "Tricky Unicode/UTF-8 case-change characters". Any other weird case quirks anyone can think of to put in the generators?
- zokier 2y agoSeems like lot of these would be taken care by normalization though? Pre-composed characters are bit of a mess. I do feel it is a error that unit/math symbols get changed, imho they should stay as-is through case conversions.
- pseingatl 2y agoSmall caps?
- cwmma 2y agotitle case for digraphs
- fedeb95 2y agoFor anyone wondering, this doesn't seem to be a problem for Java toLowerCase and toUpperCase.
- noname120 2y agoSolution: NFKD. It's the equivalent of type-casting but for unicode. https://unicode.org/reports/tr15/#Norm_Forms https://unicode.org/reports/tr15/#Norm_Forms
- freeone3000 2y agoThis changes the original text, though, which might not always be suitable.
- KineticLensman 2y agoUppest case! [0] [0] Lowestcase and uppestcase letters: Advances in derp learning, Sigbovik 1st April 2021 https://sigbovik.org/2021/proceedings.pdf https://sigbovik.org/2021/proceedings.pdf
- twic 2y agoDutch also has a digraph-which-counts-as-a-letter, "ij". But that doesn't get title-cased internally - there is a city called IJmuiden, not Ijmuiden.
- jfk13 2y agoAs a test for your browser's internationalisation support, try data:text/html,<div lang="nl" style="text-transform:capitalize">ijmuiden In Firefox, this displays correctly as "IJmuiden" (thanks to the lang attribute; without that, it would show "Ijmuiden").
- twic 2y agoOh, that's nice. Chrome and Edge both fail for me!
- kazinator 2y agoI would say, hiragana and katakana, in a way. Each nominal syllable sound in Japanese can be written using a characater in one of these two scripts: Roman transcription: a i u e o ka ki ku ke ko Hiragana: あ い う え お か き く け こ Katakana: ア イ ウ エ オ カ キ ク ケ コ There are some rough parallels between upper case and katakana. - Katakana is used less than hiragana; "katakana heavy" text will be something that is loaded with foreign words (like a software manual) or terms from zoology and botany. - It is sometimes used to denote SHOUTING, like in quoted speech such as cartoon bubbles. - Some early computing displays in the west could only produce upper case characters; in Japan, some early displays only featured katakana. It needs less resolution for clarity.
- flysand7 2y agoI've also seen a use where katakana is used to represent a "robotic" speech, like something a robot would say monotonely.
- lifthrasiir 2y ago> Katakana is used less than hiragana Katakana was used much more frequent than hiragana for about a century following the Meiji restoration, regardless of the technical limitation. That can be thought as another parallel though: Latin majuscule letters are (close to) the original Latin script while minuscule letters are derived from them, but now minuscule letters are much more frequently used. The only difference here is that either hiragana or katakana wasn't derived from each other, they share the single origin of simplified Chinese characters.
- rob74 2y agoWait what? He writes "For example, the first ten letters of the Hungarian alphabet are¹", but the note is "I got this information from the Unicode Standard, Version 15.0, Chapter 7: “Europe I”, Section 7.1: “Latin”, subsection “Latin Extended-B: U+0180-U+024F”, sub-subsection “Croatian Digraphs Matching Serbian Cyrillic Letters.” Actually it kinda makes sense to have two Latin letters form a digraph if they are used to represent a single Cyrillic letter, while it makes less sense for Hungarian, which (AFAIK) has always been written with Latin letters? I mean, of course you could do it, but then I want an extra Unicode code point for the German "sch" too! If you look at the whole Hungarian alphabet (https://learnhungarianfromhome.com/wp-content/uploads/2020/01/The-Hungarian-Alphabet-683x1024.png https://learnhungarianfromhome.com/wp-content/uploads/2020/0...), you get a total of 8 digraphs and 1 trigraph (plus 9 letters with diacritics), but "Lj" and "Nj" are not among them...
- anamexis 2y agoFrom the article: > These digraphs owe their existence in Unicode not to Hungarian but to Serbo-Croatian. Serbo-Croatian is written in both Latin script (Croatian) and Cyrillic script (Serbian), and these digraphs permit one-to-one transliteration between them.¹
- rob74 2y agoYeah, but then why bring up Hungarian (which has very little in common with Serbo-Croatian, although spoken in a neighboring country) in the first place?
- anamexis 2y agoBecause Hungarian is an example of having 3 cases, but only some of the Hungarian digraphs have these 3 cases encoded in Unicode.
- rob74 2y agoYes, buuuut Serbo-Croatian obviously has those 3 cases too, so he could have made the post much clearer by leaving out Hungarian and only focusing on Serbo-Croatian (or mentioning Hungarian only as an aside). I mean, if three of these four digraphs don't even exist in Hungarian, and "dz" is the only encoded Hungarian digraph, it's pretty obvious that the fact that it was encoded is only a coincidence?
- csours 2y agoTechnology is not implemented for internal consistency or to make sense, technological implementations are an artifact of history. Of course, at the time it made sense to someone.
- Tade0 2y agoStrange that this exists. Polish also has dz(it's the same phoneme), along with dź, dż, sz, cz, all of which use Title case in, among other instances, acronyms (e.g. RiGCz), but I'm not aware of any special code points for them - dz is definitely always spelled as d-z.
- advisedwang 2y agoPer the article: > These digraphs owe their existence in Unicode ... to Serbo-Croatian. Serbo-Croatian is written in both Latin script (Croatian) and Cyrillic script (Serbian), and these digraphs permit one-to-one transliteration between them.
- dhosek 2y agoThere are lots of weirdnesses in Unicode that are consequences of enabling lossless round-trip translations to/from legacy encodings. Inconsistencies in how the various descendants of the Brahmic script are another such consequence.
- int_19h 2y agoDoes Polish treat them as distinct letters in their own right for sorting purposes? That is usually when you see digraphs appear in (at least some) national encodings, from whence they end up in Unicode for compatibility reasons.
- dhosek 2y agoSorting rules can get really weird, and while some languages treat digraphs as separate letters for sorting, (e.g., Czech considers ch a separate letter coming after h), Polish does not.
- alexvitkov 2y agoSo taking the first character of a word and uppercasing it is wrong because you'd get "dzen" -> "DZen". I really wish the Unicode consortium would learn to say "No". If you added a three-letter letter to your alphabet, you can probably make do with three lettets in your text files. There's so many characters with little to no utility and weird properties that seem to exist just to trip up programs attempting to commit the unforgivable sin of basic text manipulation.
- ccppurcell 2y agoThis is just your monoculture speaking. Transliterations between alphabets are actually mentioned in the article, did you read it? Nobody added anything to their alphabet, alphabets are invented and then grow and shrink organically.
- f1shy 2y agoThere are other ways around without making the standard impossible to get right. Great, we have a standard that can cope with any alphabet... oh pitty that is impossible to write programs that use it correctly.
- ks2048 2y agoIt's tricky, but that's why nearly all of the time, you should use standard libraries. E.g., in Python, ".upper()" and ".capitalize()" does the work for you.
- f1shy 2y agoDoes it have titleize() ?
- ks2048 2y agoThat is capitalize() There's a note in the docs [0], Changed in version 3.8: The first character is now put into titlecase rather than uppercase. This means that characters like digraphs will only have their first letter capitalized, instead of the full character. [0] https://docs.python.org/3/library/stdtypes.html#str.capitalize https://docs.python.org/3/library/stdtypes.html#str.capitali... EDIT: As the other reply says, ".title()" is probably a better answer to your question. Warning as the docs show [1], this splits things on sequence of letters, not whitespace! >>> "they're bill's friends from the UK".title() "They'Re Bill'S Friends From The Uk" [1] https://docs.python.org/3/library/stdtypes.html#str.title https://docs.python.org/3/library/stdtypes.html#str.title
- lpapez 2y agoOn Serbian Wikipedia you have an option to automatically transliterate from Cyrillic to Latin script, so I guess this would come up in similar contexts. In Croatian it doesn't matter, literally nobody uses the digraph Unicode characters because they do not appear on the keyboard. Instead you just write these digraphs as two regular Latin characters: nj, lj and dž.
- chrismorgan 2y ago> no more than “lav” should match “law” just because the first part of the letter “w” looks like a “v”. Well of course not, it’s double u, not double v… so maybe “lau” should match “law”! (That’s one thing French got right. Dooblah vay, double v. (Is there are proper French spelling for that pronunciation? Like how h is aitch in English.))
- whynotmaybe 2y agoW is fairly recent in the official French alphabet and its officially called "double v". In Belgium it can be pronounced or heard as "way" (wé) usually for - BMW as "bay-hem-way" (bé-m-wé) - www as "way-way-way" (wé-wé-wé) - WC as "way-say" (wé-c) .
- sjrd 2y agoAnd it's so convenient, too! No letter thus requires several syllables to be pronounced. It's one thing I keep using from Belgian French despite having lived in Switzerland for over a decade, because it's objectively better. (Swiss French has the objectively better names for 70-80-90, though. No quatre-vingt-dix BS like on France. :-p)
- chrismorgan 2y agoAll the letters are one syllable, except w, which is three. All the digits are one syllable, except 7 and 0, which are two. I dislike these facts about them.
- sjrd 2y ago> Is there are proper French spelling for that pronunciation? Like how h is aitch in English. No, French doesn't have spelling for the name of letters. (I'm a native French speaker.)
- marcosdumay 2y agoIt is a double u in English. Naming it differently would be wrong. I think it's a double v in German. Since French doesn't really use it, they could import any of the names. Portuguese is on the same boat. It imported the double u name, but still has plenty of words where it's a double v... you can't make it all correct.
- qingcharles 2y agoI just fixed a function named RemoveEmojis that would strip emoji characters. The problem was that emojis were still being detected in the output, even though you could open the string and clearly see it was "plaintext." I suddenly realized the code must only be removing one part of some of the surrogate emojis, leaving behind an invisible non-printing part of an emoji in the string. Some emojis got so complex they literally scrapped them this year. The family emojis seemed cool in someone's head, but then someone tried to make a family with mixed-ethnic parents and the children are locked to one skin color; the only solution presented was to add 7,000 more emojis to Unicode. https://www.mobiletechjournal.com/the-family-emojis-are-now-equally-useless-for-everyone/ https://www.mobiletechjournal.com/the-family-emojis-are-now-...
- br1 2y agoThe Unicode consortium keeps adding garbage like emojis to keep their job...
- mijamo 2y agoEmojis are one of the best things about Unicode. They're not even that complex to handle, and they allow sooooo many things.
- yencabulator 2y agoYou're literally responding to a comment about how some emoji were too complex to even implement, much less handle universally.
- geon 2y agoI liked the smiley/simpsons colored emoji. They didn't need different skin tones.
- oniony 2y agoExcept the yellow has become a proxy for white. Even the people of colour in The Simpsons are not yellow.
- gspencley 2y agoIs this a riddle? I don't want to click on the article until I've tried to crack it. Is the answer a switch statement? Edit: ah no, we're actually talking about human language and characters.
- librasteve 2y agohere is a raku regex (see https://docs.raku.org/language/regexes#Unicode_properties https://docs.raku.org/language/regexes#Unicode_properties) "Dž" ~~ /<:Lt>/ #「Dž」 (matches) "Dž" ~~ /<:Lu>/ #Nil (doesn't match) Lt = Titlecase_Letter Lu = Uppercase_Letter raku regex are a step improvement over the original perl5 regex which is used in most current languages (both regex engines were designed by Larry Wall - raku is perl6 with a new name) deep support for Unicode and Graphemes makes raku almost unique in its support for Unicode properties within this new regex 2.0 (I hear that Swift is also strong in this area) here is a great blog series by Paweł bbkr Pabian that explains all these unicode things in a very unserstandable way https://dev.to/bbkr/utf-8-regular-expressions-20h0 https://dev.to/bbkr/utf-8-regular-expressions-20h0
- deleted 2y ago[deleted]
- unbalancedevh 2y ago> The fact that dz is treated as a single letter in Hungarian means that if you search for “mad”, it should not match “madzag” (which means “string”) because the “dz” in “madzag” is a single letter and not a “d” followed by a “z”, no more than “lav” should match “law” just because the first part of the letter “w” looks like a “v”. This doesn't seem right. If the individual letters "d" and "z" exist, then it should be possible to have them next to each other in a text file without them necessarily collapsing into a single letter -- especially if they're actually represented as separate characters, which they are in the example. Even if the letter "w" wasn't correctly represented and required actually typing "uu", you wouldn't want the word "vacuum" to be interpreted as having a "w"!
- deleted 2y ago[deleted]
- Hunpeter 2y agoYes, I'm Hungarian, and I'm not even mad (pun intended) about "mad" matching "madzag". I find that we ourselves sometimes conflate characters and letters, so many people's first thought would be that "madzag" is six letters. I think most other digraphs e.g. "sz" or "gy" are considered more tightly bound, so one would be unlikely to say that "szám" (=number) is four letters rather than three.
- d1sxeyes 2y agoYes but it’s utter nonsense that you shouldn’t return it as a search result. There’s no “dz” key on a Hungarian keyboard, so you’d need to create that (or an alternative way to type it)… and on top of that it’s not consistent. The easiest way is to imagine text being written vertically. In some cases, the digraphs (or trigraphs) will be written together on a single line, and sometimes they’ll be written on separate lines. However, more consistently, if you imagine a person’s initials, Csanádi Dzsenifer is CsDzs.
- geon 2y agoI have had to do locale specific search to avoid matching A to Ä etc.