This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How do I remove diacritics (accents) from a string in .NET?
Removing diacritics in Silverlight (String.Normalize issue)
I want to remove accent from a string in Silverlight application, for example, convert Renée to Renee.
one way is try to use following APIs:
System.Text.Encoding.GetEncoding
System.Text.Encoding.UTF8.GetString
but System.Text.Encoding.UTF8.GetString is not available for silverlight framework.
what's is the simplest way to do it in C#?
Related
This question already has answers here:
Can you access standard Windows strings like 'Cancel'?
(4 answers)
Is there a repository for localized common text in WinForms?
(2 answers)
Closed 9 years ago.
I would like to add to the form an universal 'Cancel' button. By universal I mean that on a system with different than English locales it will display localized 'Cancel' string. How to achieve this?
You need to use the localization support provided by .NET and Visual Studio. See for example a walkthrough here: Localizing Windows Forms.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Quickest way to enumerate the alphabet in C#
Howto enumerate the LOCALIZED alphabet in C#?
Is there any way in .net to generate the alphabet for the current culture? For example in English - ABCDE.... If the culture is Russian, generate such. I am working with the .net 4.5 framework.
I don't think so but you can make a function for it
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to convert a string to RTF in C#?
I was wondering if there is an easy way convert a string to RTF in C#.
Not only the standard characters but special characters i.e. as €ƒ…†‡ to.
Use the RichTextBox control. You can set it's Text property to a string then get back it's Rtf property.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How can I decode html characters in c#?
I have characters incoming from an HTML, for example:
" ' & >
Exists an native function in C# to convert to your equivalents?
Thanks,advanced.
EDIT
I'm writing a console app
I believe HttpUtility.HtmlDecode is what you're looking for.
This question already has answers here:
How can I decode HTML characters in C#?
(10 answers)
Closed 7 years ago.
How to convert the following text into a proper string in C#?
<IconStyle xmlns="http://earth.google.com/kml/2.0"><color>FFFFFFFF</color><scale>1.0</scale><Icon><href>root://icons/palette-5.png</href><x>192</x><y>192</y><w>32</w><h>32</h></Icon></IconStyle><LabelStyle xmlns="http://earth.google.com/kml/2.0"><scale>0</scale></LabelStyle><BalloonStyle xmlns="http://earth.google.com/kml/2.0"><text>$[description]</text><color>FFFFFFFF</color></BalloonStyle>
Forgot to mention the important catch:how to convert the string in a console application in c#?
That is HTML encoded, so:
HttpUtility.HtmlDecode(myHtmlEncodedString);
Reference: http://msdn.microsoft.com/en-us/library/7c5fyk1k.aspx
HttpUtility.HtmlDecode(string)