Tag Archives: unicode

Using Java Selenium, how can I select this element using a unicode value?

Questions: I am testing using Java & Selenium. I am trying to execute a click on a close button, which has the following unicode character: \ue01d. OuterHTML on that element looks like this: <input class=”form-control btn btn-clear” style=”font-family: MapIcons; padding: 0px;” value=”” type=”button”> I want to try & select it using the following: String className… Read More »

how to convert non-unicode to unicode?

Questions: In my database there is a field which type is “varchar” and cannot save my alphabet, so value is for example – “|^є^Ѓ¦`ѓЇ ^єЋ^”. and I want to convert it to unicode when I get out data. how I can? it is possible in javascript? or vb.net? IMPORTANT: I do not have to change… Read More »

iText is deforming/misspelling Unicode characters in pdf

Questions: I am trying to generate a pdf using iText v2.1.5 which basically contains Unicode characters, Ariel is the font being used for the same. Now the problem is that some of the characters like the “Hindi” and “Gujarati” characters are having issues being generated properly. Please take a look at the below screenshot to… Read More »

How to compare Unicode characters that “look alike”?

Questions: I fall into a surprising issue. I loaded a text file in my application and I have some logic which compares the value having µ. And I realized that even if the texts are same the compare value is false. Console.WriteLine(“μ”.Equals(“µ”)); // returns false Console.WriteLine(“µ”.Equals(“µ”)); // return true In later line the character µ… Read More »

How to convert a UTF-8 string into Unicode?

Questions: I have string that displays UTF-8 encoded characters, and I want to convert it back to Unicode. For now, my implementation is the following: public static string DecodeFromUtf8(this string utf8String) { // read the string as UTF-8 bytes. byte[] encodedBytes = Encoding.UTF8.GetBytes(utf8String); // convert them into unicode bytes. byte[] unicodeBytes = Encoding.Convert(Encoding.UTF8, Encoding.Unicode, encodedBytes);… Read More »

Display Unicode characters in converting Html to Pdf

Questions: I am using itextsharp dll to convert HTML to PDF. The HTML has some Unicode characters like α, β… when I try to convert HTML to PDF, Unicode characters are not shown in PDF. My function: Document doc = new Document(PageSize.LETTER); using (FileStream fs = new FileStream(Path.Combine(“Test.pdf”), FileMode.Create, FileAccess.Write, FileShare.Read)) { PdfWriter.GetInstance(doc, fs); doc.Open();… Read More »