Bug 58732 - TextInfo.ToTitleCase doesn't convert
Summary: TextInfo.ToTitleCase doesn't convert
Status: RESOLVED FEATURE
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-11 21:52 UTC by Yuri
Modified: 2017-09-11 15:21 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FEATURE

Description Yuri 2017-08-11 21:52:35 UTC
I an using this code in iOS table renderer. In PCL ToTitleCase seems to be unavailable at all.
            
string tt = "HELLO WORLD";
TextInfo ti = new CultureInfo("en-US", false).TextInfo;
string tl = ti.ToLower(tt); //"hello world" - correct!
string tc = ti.ToTitleCase(tt); //"HELLO WORLD" - wrong!
Comment 1 Marek Safar 2017-09-08 23:07:25 UTC
I’m unable to reproduce this issue locally using the information you provided. In order to investigate the issue further can you please attach a reproduction project and steps to reproduce this issue? For help on writing a bug report, please see our guide on this topic:

https://bugzilla.xamarin.com/page.cgi?id=bug-writing.html

Some of your next steps would be:

1. Including a sample project or steps to reproduce this problem
2. Your Version Information
3. Your expected results and actual results

Thank you!
Comment 2 Yuri 2017-09-11 14:43:07 UTC
There is nothing to include as a project. Please add anywhere to PLC the code I provided. Expected result is in the descriptuion
Comment 3 Yuri 2017-09-11 14:43:50 UTC
Sorry, not in PCL, anywhere in iOS Native project
Comment 4 Marek Safar 2017-09-11 14:53:29 UTC
What is your expected result?

From MSDN https://msdn.microsoft.com/en-us/library/system.globalization.textinfo.totitlecase(v=vs.110).aspx#Anchor_2

>However, this method does not currently provide proper casing to convert a word that is entirely uppercase, such as an acronym.
Comment 5 Yuri 2017-09-11 15:06:21 UTC
I expected it to work with all uppercase original string. I was wrong, it is not supposed to work according to the documentation. The solution is to convert the string to lowercase and then to title case. Great job, Microsoft! You can convert from lower case but not from upper case. 
You can close this issue.
Comment 6 Marek Safar 2017-09-11 15:21:57 UTC
Resolved