public virtual char ToUpper(char c) { // quick ASCII range check if (c < 0x60) { return(c); } else if ('a' <= c && c <= 'z' && (!handleDotI || c != 'i')) { return((char)(c - 0x20)); } if (ci == null || ci.LCID == 0x7F) { return(CharUnicodeInfo.ToUpperInvariant(c)); } switch (c) { case '\u0069': // Latin lowercase i if (handleDotI) { return('\u0130'); // dotted capital I } break; case '\u0131': // dotless i return('\u0049'); // I case '\u01c5': // see ToLower() return('\u01c4'); case '\u01c8': // see ToLower() return('\u01c7'); case '\u01cb': // see ToLower() return('\u01ca'); case '\u01f2': // see ToLower() return('\u01f1'); case '\u0390': // GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS return('\u03aa'); // it is not in ICU case '\u03b0': // GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS return('\u03ab'); // it is not in ICU case '\u03d0': // GREEK BETA return('\u0392'); case '\u03d1': // GREEK THETA return('\u0398'); case '\u03d5': // GREEK PHI return('\u03a6'); case '\u03d6': // GREEK PI return('\u03a0'); case '\u03f0': // GREEK KAPPA return('\u039a'); case '\u03f1': // GREEK RHO return('\u03a1'); // am not sure why miscellaneous GREEK symbols are // not handled here. } return(CharUnicodeInfo.ToUpperInvariant(c)); }