About 7,260,000 results
Open links in new tab
  1. Replacing unicode characters in string in C# - Stack Overflow

    Jun 23, 2013 · Here's a function that uses these building blocks to perform the conversion: var enumerator = StringInfo.GetTextElementEnumerator(s); var sb = new StringBuilder(); while (enumerator.MoveNext()) var unicodeChar = enumerator.GetTextElement(); var codePoint = char.ConvertToUtf32(unicodeChar, 0); if (codePoint < 0x80) { sb.Append(unicodeChar);

  2. Introduction to character encoding in .NET - .NET | Microsoft Learn

    Oct 22, 2024 · The string.ToUpperInvariant method has access to both parts of each surrogate pair, so it can handle all Unicode code points correctly. Iterate through the Unicode scalar values as Rune instances instead of char instances, as shown in the following example.

  3. Using Unicode in C# Strings: A Comprehensive Guide - Web Dev …

    Aug 20, 2024 · In this guide, we explored how to effectively use Unicode in C# strings to work with a diverse set of characters and symbols. By understanding and leveraging Unicode support in C#, you can create applications that are capable of handling …

  4. Troubleshooting Unicode Character Replacement in C#

    Feb 26, 2025 · Learn how to replace Unicode characters in C# effectively, especially when dealing with multi-lingual text. This guide addresses common issues encountered during character replacement using C# methods.

  5. Problems with Unicode character encoding : r/csharp - Reddit

    Sep 18, 2022 · I'm having difficulties with converting and displaying Unicode characters in one of my C# projects. So I decided to try one of the examples published by Microsoft : // Create a UTF-8 encoding. UTF8Encoding utf8 = new UTF8Encoding(); // A Unicode string with two characters outside an 8-bit code range. String unicodeString =

  6. c# - Unicode characters in string - Stack Overflow

    Nov 5, 2013 · I want to get the characters of Unicode in C# e.g char ch1 = '\u2085'; char ch2 = '\u2086'; char ch3 = '\u2087'; char ch4 = '\u2088'; char ch5 = '\u2089'; but it return boxes instead of symbol...

  7. Outputting a Unicode character in C# - Stack Overflow

    Jul 2, 2010 · If you want to display the actual character, then you want: Console.WriteLine(myString); You must be using a font that has that Unicode range for it to display properly. UPDATE: Using default console font the above Console.WriteLine(myString) will output a ? character as there is no \u2649. As far I have so far googled, there is no easy way to ...

  8. How to use character encoding classes in .NET - .NET

    Sep 15, 2021 · An encoder converts a string of characters (most commonly, Unicode characters) to its numeric (byte) equivalent. For example, you might use an ASCII encoder to convert Unicode characters to ASCII so that they can be displayed at the console. To perform the conversion, you call the Encoding.GetBytes method.

  9. Converting Unicode to String in C# - Web Dev Tutor

    Jul 22, 2024 · Converting Unicode to string in C# is essential when dealing with internationalization and multilingual applications. By leveraging the Encoding class or Unicode escape sequences, you can easily work with Unicode characters and …

  10. String Encoding/Decoding and Conversions in C# - C# Corner

    UTF8Encoding class encodes Unicode characters using UTF-8 encoding (UTF-8 stands for UCS Transformation Format, 8-bit form). This supports all Unicode character values and can also be accessed as code page 65001.

  11. Some results have been removed
Refresh