special-characters

jQuery highlight plugin breaks a word with special characters (üöä)

会有一股神秘感。 提交于 2019-12-12 02:14:39
问题 I have a jQuery plugin that on input of word highlights the corresponding value in text. Words can be separated with space too. My problem is when there is a word with special characters (ü,ö or ä). When I enter for example 'dölor' or 'faücibus', the highlight breaks so that it looks like 'd lor' or 'fa cibus'. jsfiddle: http://jsfiddle.net/qbwe4/1/ HTML <body> <input type="text" class="span1 disabled" id="field1" name="field1"><br> <input type="text" class="span1 disabled" id="field2" name=

Handling danish special characters [duplicate]

对着背影说爱祢 提交于 2019-12-12 02:09:29
问题 This question already has answers here : how to replace special characters with the ones they're based on in PHP? (8 answers) Closed 5 years ago . I am trying to parse a string, split it on what is not a letter or number $parse_query_arguments = preg_split("/[^a-z0-9]+/i", 'København'); and construct a mysql query. Even if I skip the preg_split and try to enter the string directly it breaks it into 2 different strings, 'K' and 'benhavn'. How can I deal with these issues? 回答1: If you're using

Azure Service Bus Queue gives control characters in fetched message

自古美人都是妖i 提交于 2019-12-12 01:16:35
问题 I am using BizTalk Server SB-Messaging adapter to retreive messages from Azure Service Bus Queue. I have successfully managed to send message to queue myself (using same adapter), and retreive message from queue and do further processing. Problem arises when a 3rd party software supplier is sending messages to the queue, and for BizTalk Server to retreive and process message. I then receive the following additional "header"-information and control characters in the beginning of the message:

Cannot pass special characters to an NSTask

扶醉桌前 提交于 2019-12-11 23:55:26
问题 In Cocoa, I would like to pass a string containing special characters to an NSTask as arguments, however the task does not get the proper string. NSString *city=@"Zürich"; // This is the string with a special character [arguments addObject:[NSString stringWithFormat:@"-iptc:city=%@",city]]; NSTask *task=[NSTask new]; [task setLaunchPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"exiftool"]]; [arguments addObjectsFromArray:[NSArray arrayWithObjects:@"-L",@"

Bash 4.4 prompt escape for number of jobs currently running

天大地大妈咪最大 提交于 2019-12-11 23:13:54
问题 I stumbled across this post where user chepner proposed in his answer the usage of \j (as mentioned in the bash manual) to retrieve the current running count of background jobs. Basically it boils down to num_jobs="\j" echo ${num_jobs@P} Can anyone enlighten me on what is going on here exactly? E.g. why ${\j@P} is not working and what @P is doing exactly? 回答1: Like any parameter expansion, you have to supply the name of a parameter, not an arbitrary string. \j isn't the name of a parameter;

php preg_replace € sign with “euro”

拟墨画扇 提交于 2019-12-11 20:39:43
问题 I would like to replace the € sign in $XML_COMMENT with "euros" before adding to a xml file. The € sign not being a utf-8 character I get and error message from simplexml Warning: SimpleXMLElement::addAttribute(): string is not in UTF-8 in ... Warning: SimpleXMLElement::asXML(): output conversion failed due to conv error, bytes 0x82 0x26 0x61 0x6D in .... The euro sign appears in the MySQL (utf-8) database as '€' But appears correctly in the textarea on the webpage. I tried to use these

Why can't I split a string on control characters?

 ̄綄美尐妖づ 提交于 2019-12-11 20:14:38
问题 I am trying to split a line when I find the characters ^C or ^B together. For some reason it is not splitting properly. I have been on Rubular and tested this and supposedly it should split it. The lines that I am reading in and trying to split look something like this: SOME_KEY^CSOME_VALUE^BSOME_KEY^CSOME_VALUE The code is: final_array = [] temp_array = [] array__with_all_of_the_data.each do |x| temp_array = x.split(/\^C/) temp_array.each do |y| final_array << y.split(/\^B/) end @final_array

Special character in filename are not supported while copying using URI

有些话、适合烂在心里 提交于 2019-12-11 19:12:04
问题 I need to copy the files(file name contains special character) from one path to another path using URI. But its throws an error. If its successfully copied, if the filename not contains special character. Could you please advise me how to copy the file name with special character using URI from one path to another path. I have copied the code and error below. Code:- import java.io.*; import java.net.URI; import java.nio.ByteBuffer; import java.nio.channels.Channels; import java.nio.channels

how to extract data from mysql that contains special characters? [duplicate]

怎甘沉沦 提交于 2019-12-11 18:38:13
问题 This question already has answers here : php echoing angle brackets (4 answers) Closed 6 years ago . Example data in my database: blabla<blabla I use phpmyadmin and can see that the data has been input successfully. However when I try to display the data what I get is: blabla NOT blabla<blabla In other words, everything after the < symbol does not display. <? while ($mouselist_row = mysql_fetch_array($mouselist)) { $mouselist_commonstrain = mysql_real_escape_string($mouselist_row['Common

Read UTF-8 special chars from external file using Javascript

你离开我真会死。 提交于 2019-12-11 18:17:57
问题 I have a UTF-8 encoded file "myFile.aaa" with non-printable char represented by hexadecimal x80 (decimal 128). I need to develop a Javascript function that will read this char from myFile.aaa and return its decimal value, 128. Is it possible to do that? How? If I copy myFile.aaa content to " var data ", and do " data[0].charCodeAt(0) " I get value 8364 instead of 128. Thanks 回答1: I don't think your UTF-8 encoding makes sense, so I'm going to tell you the best way I've found of dealing with