special-characters

I don't use unicode characters in my android-textview.How can I do this?

烂漫一生 提交于 2019-12-04 21:13:30
I don't use unicode characters in my android-textview.How can I do this? my xml : <?xml version="1.0" encoding="utf-8"?> and I don't use unicode characters in android textview,edittext,.... Summary of comment thread: Save .txt file containing şile as UTF-8. (For Notepad, best: UTF-8 without BOM.) Load from code using a new InputStreamReader(inputStream, "utf-8") . 来源: https://stackoverflow.com/questions/9108876/i-dont-use-unicode-characters-in-my-android-textview-how-can-i-do-this

How to show superscript for “®” registered symbol?

两盒软妹~` 提交于 2019-12-04 17:03:42
问题 I've a issue regarding showing registered symbol as superscript. I've used unicode value \u00AE, but it shows in same line. I'd like to have it a bit top of remaining texts. Done googling, but found superscripts for A-Z, 0-9 characters, which is mentioned in unicode's site. Sample code: UILabel *myLabel; //do initialize stuff here myLabel.text = @"My company\u00AE"; Thanks 回答1: Unicode does not have a registered symbol in superscript form so the only way to do it is to use a HTML control and

How to edit shortcut properties where shortcut name has registered text ®

若如初见. 提交于 2019-12-04 16:42:32
I am trying to edit the properties of the shortcut using batch script. But the short cut name includes a character ® hence when i run the changeproperties.bat file it fails to read the file name correctly. I am able to do the same task via poweshell. My powershell script has belwo line and it works $shortCut = ("$desktop\testapp®.lnk") $shell = New-Object -COM WScript.Shell $shortcut = $shell.CreateShortcut($shortCut) ## Open the lnk $shortcut.TargetPath = "C:\Users\Public\newtarget.bat" $shortCut.Save() The machine where i will run this will not have permission to run powershell. Hence trying

Converting “Bizarre” Chars in String to Roman Chars

跟風遠走 提交于 2019-12-04 16:40:06
I need to be able to convert user input to [a-z] roman characters ONLY (not case sensitive). So, there are only 26 characters that I am interested in. However, the user can type in any "form" of those characters that they wish. The Spanish "n", the French "e", and the German "u" can all have accents from the user input (which are removed by the program). I've gotten pretty close with these two extension methods: public static string LettersOnly(this string Instring) { char[] aChar = Instring.ToCharArray(); int intCount = 0; string strTemp = ""; for (intCount = 0; intCount <= Instring.Length -

How can I use literal single quotes inside the argument to perl's -e?

半腔热情 提交于 2019-12-04 16:29:13
I try to create a short perl command that creates SQL inserts for my DB based on a text file. However, I am not able to get in the single-quotes used by SQL perl -pe '$i += 1; chomp; @a = split /\t/; $_ = "INSERT INTO XYZ VALUES($i, \'$a[4]\');\n"' results in a syntax error near unexpected token `)' Any ideas? perl -pe '$i += 1; chomp; @a = split /\t/; $_ = "INSERT INTO XYZ VALUES($i, \047$a[4]\047);\n";' You need to escape them for the shell, not for Perl. This requires a slightly different syntax. Assuming you're running this under bash, ksh, or similar, then perl -e 'print "greengrocer'\''s

How do I make eclipse print out weird characters in unicode?

强颜欢笑 提交于 2019-12-04 13:06:49
问题 So I'm trying to make my program output a text file with a list of names. Some of the names have weird characters, such as Åström. I have grabbed these list of names from a webpage that is encoded in "UTF-8", or at least I'm pretty sure it does because the page source says " meta http-equiv="Content-Type" content="text/html; charset=UTF-8" / " This is what I've tried so far: public static void write(List<String> list) throws IOException { Writer out = new OutputStreamWriter(new

How to detect if input is quote?

佐手、 提交于 2019-12-04 13:03:51
I have the following code if "%userInput%"==""" ( do_something ) I would like it to detect if the %userInput% is a quote( " ). However, this code throws an error. How to detect if input is a quote? Here is a solution without delayed expansion that should work with any input, including spaces and poison characters. My test code is in a loop. When you are ready to quit, simply press <Enter> without typing anything. @echo off setlocal :loop set "var=" set /p "var=enter a string: " if not defined var exit /b if "%var:"=""%" == """" echo equals quote echo( goto loop The trick should be fairly

Convert special characters to normal

亡梦爱人 提交于 2019-12-04 12:36:08
I need a way to convert special characters like this: Helloæ To normal characters. So this word would end up being Helloae . So far I have tried HttpUtility.Decode , or a method that would convert UTF8 to win1252, but nothing worked. Is there something simple and generic that would do this job? Thank you. EDIT I have tried implementing those two methods using posts here on OC. Here's the methods: public static string ConvertUTF8ToWin1252(string _source) { Encoding utf8 = new UTF8Encoding(); Encoding win1252 = Encoding.GetEncoding(1252); byte[] input = _source.ToUTF8ByteArray(); byte[] output =

Special characters in url in Safari

廉价感情. 提交于 2019-12-04 10:02:27
We are using some special characters in our web application like this: example.com/foo#вап . We parse hash using decodeURI(window.location.hash) (and sometimes hash contains not encoded special characters) and set new value like window.location.hash = "вап" . Everything works fine in Chrome, Firefox, Opera and even IE, but in Safari we get 20? instead вап . If set hash in Safari like window.location.hash = encodeURI("вап"); it works, but of course it doesn't work in Chrome, FF and others. Finally I found the solution. If set hash through window.location.href everything works fine. Here is the

Converting special charactes such as ü and à back to their original, latin alphbet counterparts in C#

十年热恋 提交于 2019-12-04 09:07:30
问题 I have been given an export from a MySQL database that seems to have had it's encoding muddled somewhat over time and contains a mix of HTML char codes such as & uuml; and more problematic characters representing the same letters such as ü and à . It is my task to to bring some consistency back to the file and get everything into the correct Latin characters, e.g. ú and ó . An example of the sort of string I am dealing with is Desinfektionslösungstücher für Flächen Which should