Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Update: Java 6 introduced <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html#ROOT" rel="nofollow noreferrer"><code>Locale.ROOT</code></a> which is described as:</p> <blockquote> <p>This is regarded as the base locale of all locales, and is used as the language/country neutral locale for the locale sensitive operations.</p> </blockquote> <p>This is probably better than using US, but I haven't checked it against the code below.</p> <hr> <p>No, that's basically the right way to go. While there <em>are</em> differences between the US culture and the invariant culture in terms of formatting, I don't believe they affect casing rules.</p> <p>EDIT: Actually, a quick test program shows there <em>are</em> characters which are upper-cased differently in .NET in the US culture to in the invariant culture:</p> <pre><code>using System; using System.Globalization; class Test { static void Main() { CultureInfo us = new CultureInfo("en-US"); for (int i = 0; i &lt; 65536; i++) { char c = (char) i; string s = c.ToString(); if (s.ToUpperInvariant() != s.ToUpper(us)) { Console.WriteLine(i.ToString("x4")); } } } } </code></pre> <p>Output:</p> <pre><code>00b5 0131 017f 01c5 01c8 01cb 01f2 0345 0390 03b0 03c2 03d0 03d1 03d5 03d6 03f0 03f1 03f5 1e9b 1fbe </code></pre> <p>I don't have time to look at these right now, but it's worth investigating. I don't know if the same differences would apply in Java - you probably want to take a sample of them and work out what you want your code to do.</p> <p>EDIT: And just to be completist, it's worth mentioning that that only checks for individual characters... whereas you're really upper-casing whole strings, which can make a difference.</p> <p>Looking at the <em>Java</em> code for upper-casing, that appears to only have locale-specific behaviour for tr, az and lt countries. I know that tr is Turkey, but I don't know about the others...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload