News for hackers. Stuff that matters.
Re:ISO name change for Türkiye by sebazzz on Tuesday July 12, 2022 @07:25AM (#32068307)
That's complicated:

    "Türkiye".ToUpperInvariant()

    "Türkiye".ToUpper()
TÜRKIYE

    "Türkiye".ToUpper([System.Globalization.CultureInfo]::GetCultureInfo("tr-TR"))
TÜRKİYE
Re:ISO name change for Türkiye by devoutsalsa on Tuesday July 12, 2022 @07:44AM (#32068457)
I just got this...

    > "Türkiye".capitalize()
    UniquenessError("Ankara is already the capital")
Re:ISO name change for Türkiye by eesmith on Tuesday July 12, 2022 @08:24AM (#32068819)
Something's wrong with your implementation. That shouldn't be a uniqueness constraint as a country may have multiple capitals. https://en.wikipedia.org/wiki/List_of_countries_with_multipl...

Also, "Nauru".capitalize() should succeed as it has no official capital.

(tongue firmly in cheek ;)

Re:ISO name change for Türkiye by zinekeller on Tuesday July 12, 2022 @08:55AM (#32069180)
Can someone help me? Is this an error?

  "Switzerland".capitalize()
  "HELVETICA"
Re:ISO name change for Türkiye by throw0101a on Tuesday July 12, 2022 @10:30AM (#32070505)
Switzerland has four official languages, with the English word "Switzerland" having a particular translation to each one. But if you choose a single official name in one of those languages, it is not fair to the others, so in addition an official name in each language, they have an official in a 'neutral' language: Latin.

> Due to its linguistic diversity, Switzerland is known by a variety of native names: Schweiz [ˈʃvaɪts] (German);[note 5] Suisse [sɥis(ə)] (French); Svizzera [ˈzvittsera] (Italian); and Svizra [ˈʒviːtsrɐ, ˈʒviːtsʁɐ] (Romansh).[note 6] On coins and stamps, the Latin name, Confoederatio Helvetica – frequently shortened to "Helvetia" – is used instead of the four national languages.

* https://en.wikipedia.org/wiki/Switzerland

That's also why the ccTLD of Switzerland is .ch.

What you're seeing may be an 'artifact' of that.

Re:ISO name change for Türkiye by pyuser583 on Tuesday July 12, 2022 @01:32PM (#32073240)
Yeah lots of people confuse that domain for China.
Re:ISO name change for Türkiye by eesmith on Tuesday July 12, 2022 @10:33AM (#32070555)
Odd. I get:

  "Switzerland".capitalize()
  𝔈ℑ𝔇𝔊𝔈𝔑𝔒𝔖𝔖𝔈𝔑𝔖ℭℌ𝔄𝔉𝔗
Maybe my locale is messed up?
Re:ISO name change for Türkiye by cardiffspaceman on Tuesday July 12, 2022 @12:18PM (#32072132)
It looks like Fraktur to me.

https://en.wikipedia.org/wiki/Fraktur

Re:ISO name change for Türkiye by eesmith on Tuesday July 12, 2022 @03:22PM (#32074513)
Got it in one.
Re:ISO name change for Türkiye by devoutsalsa on Tuesday July 12, 2022 @11:45AM (#32071604)
Are you in china? That looks like Canton-ese.
Re:ISO name change for Türkiye by eesmith on Tuesday July 12, 2022 @03:54PM (#32074845)
It's a thread of jokes. devoutsalsa started with a joke mixing the two meanings of "capital" using a fake example. I joked that "UniquenessError" isn't the right error, as some countries have more than one capital and two countries have no official capital.

One of those two is Switzerland, which has the official Latin name "Confoederatio Helvetica", leading zinekeller joke that the capital form was "HELVETICA". See https://en.wikipedia.org/wiki/Name_of_Switzerland .

I pretended my implementation of that non-extent programming language generated "Eidgenossenschaft", see https://en.wikipedia.org/wiki/Eidgenossenschaft . As that's a German word, I decided to use a blackletter typeface, specifically, the Fraktur in Unicode which is meant to encode mathematical alphanumeric symbols, then imply that my locale the reason I got a German word.

Re:ISO name change for Türkiye by roxymusic1973 on Tuesday July 12, 2022 @04:20PM (#32075121)
...and Switzerland is divided into cantons :)
Re:ISO name change for Türkiye by daveslash on Wednesday July 13, 2022 @11:53AM (#32084417)
I can't tell if you're joking or not! :-o What language/framework is this in?

Edit: I now understand this to be a joke. But.., given the craziness that I've seen in the past, this doesn't seem out of the realm of plausibility!

Re:ISO name change for Türkiye by dane-pgp on Tuesday July 12, 2022 @12:25PM (#32072249)
I think you don't have the right fonts installed.
Re:ISO name change for Türkiye by skissane on Tuesday July 12, 2022 @07:16PM (#32077035)
> That shouldn't be a uniqueness constraint as a country may have multiple capitals

And, in theory, two countries could share the same capital (as a condominium which is equal joint territory of both, or some kind of third territory belonging to neither), although I'm not aware that's ever actually happened. But, at the subnational level, it has happened in India – Chandigarh is the joint capital of two Indian states (Punjab and Chandigarh), each of which has it as its capital despite it being in neither of them, as well as being a union territory (and hence also capital of itself).

Re:ISO name change for Türkiye by cachvico on Tuesday July 12, 2022 @09:44PM (#32078089)
Israel and Palestine.
Re:ISO name change for Türkiye by Smoosh on Wednesday July 13, 2022 @02:19AM (#32079550)
Mine says:

    > "Türkiye".capitalize()
    PrivacyError("That's nobody's business but the Turks'")
Re:ISO name change for Türkiye by dhosek on Tuesday July 12, 2022 @12:52PM (#32072660)
Reminds me of the bug in PHP where they used a call to toUpper without specifying locale to enable their case insensitivity and if your locale was Turkey, you couldn’t call any library calls with an i in them if you typed them in lowercase because, e.g., call to phpinfo() would get case-folded into PHPİNFO().
Re:ISO name change for Türkiye by gpmcadam on Tuesday July 12, 2022 @11:08AM (#32071075)
In JavaScript, you can use `String.prototype.toLocaleUpperCase()`

    > 'Türkiye'.toLocaleUpperCase('TR')
    'TÜRKİYE'

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Re:ISO name change for Türkiye by arianvanp on Tuesday July 12, 2022 @12:04PM (#32071891)
In JavaScript:

    "Türkiye".toLocaleUpperCase("tr-TR")
    'TÜRKİYE'