special-characters

How can I display “$£Ω€απ⅔” in Jasperserver PDF using iReport?

血红的双手。 提交于 2019-11-26 01:45:44
问题 I\'ve hardcoded a Text field with the value \":$£Ω€απ⅔:\" to test if these characters will show in PDF But it only prints as :$£€: I\'ve tried changing the font to \"Symbol\" but that does not do the trick. Note: I\'m using iReport 5.5 回答1: I tried your characters using font-extensions in iReport, These are the steps that I took Download (or use one on your pc) your desired ttf font (it need to support the characters), I used dejavu-serif. Install the font in iReport or in Jasper soft studio

Remove all special characters with RegExp

£可爱£侵袭症+ 提交于 2019-11-26 01:44:20
问题 I would like a RegExp that will remove all special characters from a string. I am trying something like this but it doesn’t work in IE7, though it works in Firefox. var specialChars = \"!@#$^&%*()+=-[]\\/{}|:<>?,.\"; for (var i = 0; i < specialChars.length; i++) { stringToReplace = stringToReplace.replace(new RegExp(\"\\\\\" + specialChars[i], \"gi\"), \"\"); } A detailed description of the RegExp would be helpful as well. 回答1: var desired = stringToReplace.replace(/[^\w\s]/gi, '') As was

Converting Symbols, Accent Letters to English Alphabet

人盡茶涼 提交于 2019-11-26 00:27:44
问题 The problem is that, as you know, there are thousands of characters in the Unicode chart and I want to convert all the similar characters to the letters which are in English alphabet. For instance here are a few conversions: ҥ->H Ѷ->V Ȳ->Y Ǭ->O Ƈ->C tђє Ŧค๓เℓy --> the Family ... and I saw that there are more than 20 versions of letter A/a. and I don\'t know how to classify them. They look like needles in the haystack. The complete list of unicode chars is at http://www.ssec.wisc.edu/~tomw

Remove all special characters with RegExp

爱⌒轻易说出口 提交于 2019-11-25 23:51:42
I would like a RegExp that will remove all special characters from a string. I am trying something like this but it doesn’t work in IE7, though it works in Firefox. var specialChars = "!@#$^&%*()+=-[]\/{}|:<>?,."; for (var i = 0; i < specialChars.length; i++) { stringToReplace = stringToReplace.replace(new RegExp("\\" + specialChars[i], "gi"), ""); } A detailed description of the RegExp would be helpful as well. var desired = stringToReplace.replace(/[^\w\s]/gi, '') As was mentioned in the comments it's easier to do this as a whitelist - replace the characters which aren't in your safelist.

What is the difference between \r and \n?

Deadly 提交于 2019-11-25 23:12:41
问题 How are \\r and \\n different? I think it has something to do with Unix vs. Windows vs. Mac, but I\'m not sure exactly how they\'re different, and which to search for/match in regexes. 回答1: They're different characters. \r is carriage return, and \n is line feed. On "old" printers, \r sent the print head back to the start of the line, and \n advanced the paper by one line. Both were therefore necessary to start printing on the next line. Obviously that's somewhat irrelevant now, although

Insert text with single quotes in PostgreSQL

允我心安 提交于 2019-11-25 21:49:38
问题 I have a table test(id,name) . I need to insert values like: user\'s log , \'my user\' , customer\'s . insert into test values (1,\'user\'s log\'); insert into test values (2,\'\'my users\'\'); insert into test values (3,\'customer\'s\'); I am getting an error if I run any of the above statements. If there is any method to do this correctly please share. I don\'t want any prepared statements. Is it possible using sql escaping mechanism? 回答1: String literals Escaping single quotes ' by