special-characters

How do I split a string with special characters into a NSMutableArray

青春壹個敷衍的年華 提交于 2020-01-02 05:14:12
问题 I'am trying to seperate a string with danish characters into a NSMutableArray. But something is not working. :( My code: NSString *danishString = @"æøå"; NSMutableArray *characters = [[NSMutableArray alloc] initWithCapacity:[danishString length]]; for (int i=0; i < [danishString length]; i++) { NSString *ichar = [NSString stringWithFormat:@"%c", [danishString characterAtIndex:i ]]; [characters addObject:ichar]; } If I do at NSLog on the danishString it works (returns æøå); But if I do a NSLog

How should i pass the password(containing special chars) as commandline argument?

蹲街弑〆低调 提交于 2020-01-02 03:24:08
问题 I have a deployment script to which i have to pass LDAP password as cmd paramater. actual password: foo\$ser"ver\\ 1 (contains three space characters: at the beginning, before 1 , and after 1 ) e.g ...bin>deployment.bat LDAPPassword= foo\$ser\"ver\\ 1 Note:There are spaces in the password as shown at the beginning. The deployment.bat calls a class to which the above parameter is passed as an argument. The problem is that the class receives 2 distinct arguments: args[0]= foo\$ser"ver\\ //The

XML Parsing Error: undefined entity - special characters

前提是你 提交于 2020-01-02 02:48:05
问题 Why does XML display error on certain special characters and some are ok? For instance, below will create error, <?xml version="1.0" standalone="yes"?> <Customers> <Customer> <Name>Löic</Name> </Customer> </Customers> but this is ok, <?xml version="1.0" standalone="yes"?> <Customers> <Customer> <Name>&</Name> </Customer> </Customers> I convert the special character through php - htmlentities('Löic',ENT_QUOTES) by the way. How can I get around this? Thanks. EDIT: I found that it works fine if

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

穿精又带淫゛_ 提交于 2020-01-01 17:15:07
问题 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"

In Ruby, how to convert special characters like ë,à,é,ä all to e,a,e,a?

邮差的信 提交于 2020-01-01 12:38:29
问题 I want to convert characters like ë to just plain e . I am looking to convert with regards to language and how people type cities. For example, most people actually type Brasilia when searching for it, instead of Brasília. And when news agencies like Rueters report on Brasília, they usually spell it Brasilia. So again, just looking for any gem (or character encoding math/method is probably better since that answer can be used, for reference, in other languages). This is just to handle the

PHP PDO with Special Characters

陌路散爱 提交于 2020-01-01 11:53:32
问题 I am using PDO for MySQL database connection, selecting, updating and deleting. But I have a problem with selecting rows with special characters , for instance, I want to select a page title with 'Judge-Fürstová Mila', Table page , id title content 1 Judge-Fürstová Mila xxx SQL, SELECT * FROM page WHERE title = 'Judge-Fürstová Mila' Returns result if I query via phpmyadmin. But it return 0 with PDO, $sql = ' SELECT * FROM page WHERE title = ?'; $items = $connection->fetch_assoc($sql,'Judge

PHP PDO with Special Characters

♀尐吖头ヾ 提交于 2020-01-01 11:53:27
问题 I am using PDO for MySQL database connection, selecting, updating and deleting. But I have a problem with selecting rows with special characters , for instance, I want to select a page title with 'Judge-Fürstová Mila', Table page , id title content 1 Judge-Fürstová Mila xxx SQL, SELECT * FROM page WHERE title = 'Judge-Fürstová Mila' Returns result if I query via phpmyadmin. But it return 0 with PDO, $sql = ' SELECT * FROM page WHERE title = ?'; $items = $connection->fetch_assoc($sql,'Judge

How can I use Turkish characters like 'ş ç ı ö' in an Android TextView?

有些话、适合烂在心里 提交于 2020-01-01 00:48:14
问题 I want to write 'ile' in android TextView but it isn't drawn correctly. How can use characters like this? For example I set the my textview as 'çile' it shows as '?ile' instead; how can I fix this? 回答1: This answer solved my problems for turkish characters. https://stackoverflow.com/a/9312031/218198 回答2: Try the following and see if it helps (source): String description = "Turkish characters here"; TextView tv = (TextView) findViewById(R.id.description); tv.setText(Html.fromHtml(description)

Can't read UTF-8 filenames when launched as an Upstart service

喜夏-厌秋 提交于 2019-12-31 12:53:30
问题 My Java program reads the contents of a directory recursively. This is a sample tree (note the non-ASCII characters): ./sviluppo ./sviluppo/ciaò ./sviluppo/ciaò/subdir ./sviluppo/pippo ./sviluppo/pippo/prova2.txt <-file ./sviluppo/così The program is started as an Upstart service, with a configuration file named like /init/myservice.conf description "Private Service" author "AD" start on runlevel [2345] stop on runlevel [! 2345] exec java -jar /home/mainFind.jar >> /tmp/log.txt When I launch

Unicode class names in C# - why do some work, when others don't?

北战南征 提交于 2019-12-30 18:21:11
问题 I'm wondering why this is. I have two unicode characters from the same group Ll, which is allowed according to the specs: http://msdn.microsoft.com/en-us/library/aa664670%28VS.71%29.aspx One of them works, the other gives a compile error, and I can't find any documentation on why this is: This works: U+0467 CYRILLIC SMALL LETTER LITTLE YUS ѧ This don't: U+04FF CYRILLIC SMALL LETTER HA WITH STROKE ӿ Can you help me find the pattern? 回答1: U+0467 is from Unicode 1.1, whereas U+04FF is from