Groups | Blog | Home
all groups > dotnet internationalization > may 2006 >

dotnet internationalization : System.Globalisation.CultureInfo.TextInfo.ToTitleCase()


Michael (michka) Kaplan [MS]
5/11/2006 6:17:51 AM
Title Case does not mean "Proper Case" in the sense of capitalizing the
first letter -- it is a Unicode property of each character -- which in this
string is the same as the uppercase form.


--
MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

This posting is provided "AS IS" with
no warranties, and confers no rights.


[quoted text, click to view]

Sharat Koya
5/11/2006 11:21:04 AM
has anyone got ToTitleCase to work in .net 2.0?

I have tried the following console app and it still returns capitals.

Thanks





class Program

{

static void Main(string[] args)

{

string hello = "HELLOWORLD";

Console.WriteLine(TitleCase(hello));

Console.ReadLine();


}

private static string TitleCase(string s)

{

System.Globalization.CultureInfo textInfo =
System.Threading.Thread.CurrentThread.CurrentCulture;

return textInfo.TextInfo.ToTitleCase(s);

}

}

Sharat Koya
5/11/2006 5:03:52 PM
Ah I see, thanks for your response.
What is the best way of performing Proper Case? Is there a built in function
or is it a case of a series of string functions?

Thanks

Sharat

"Michael (michka) Kaplan [MS]" <michkap@microsoft.online.com> wrote in
message news:eeg5C1PdGHA.1260@TK2MSFTNGP05.phx.gbl...
[quoted text, click to view]

Sharat Koya
5/11/2006 8:02:17 PM
http://support.microsoft.com/default.aspx?scid=kb;en-us;312897

this article also states Proper Case ?



"Michael (michka) Kaplan [MS]" <michkap@microsoft.online.com> wrote in
message news:eeg5C1PdGHA.1260@TK2MSFTNGP05.phx.gbl...
[quoted text, click to view]

Sharat Koya
5/11/2006 8:09:58 PM
I have given up and found this...

http://www.heikniemi.net/hc/archives/000145.html




[quoted text, click to view]

Michael (michka) Kaplan [MS]
5/13/2006 3:43:14 PM
VB has had primitive support for "proper case" since the early days of VB$,
possdibly earlier. It is not the same as title case, which is following the
Unicode definition.


--
MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

This posting is provided "AS IS" with
no warranties, and confers no rights.


[quoted text, click to view]

AddThis Social Bookmark Button