special-characters

need to handle special character validation using javascript

Special characters <,>,%,'',"",$,^ are not allowed in a textbox. I need to put a validation check to restrict these characters on submit along with the null check. I wrote entire validation code in a function and calling it on click of submit but the function is not recognised on click. Please help me in this java script to acheive th...

Special characters in XML files - processing with the DOM API

Hello, I have a file, which is in XML format (consists just of root start and end tags, and children of the root). The text elements of the children contain the ampersand symbol &. In XML it is not allowed to have this symbol in order the document to be valid, and when I tried to process the file using the DOM API in Java and an XML par...

ASP.NET Web Service - how to handle special characters in strings?

To show this fundamental issue in .NET and the reason for this question, I have written a simple test web service with one method (EditString), and a consumer console app that calls it. They are both standard web service/console applications created via File/New Project, etc., so I won't list the whole code - just the methods in questio...

how do i block or restrict special characters from input fields with jquery?

How do I block special characters from being typed into an input field with jquery? ...

Why does this program display seemingly random characters? (C++)

Well, not random, because its the same every time, but #include<iostream> using namespace std; int main() { char box[10][10]; for(int i=-1;i<11;i++) { cout<<"---------------------"<<endl<<"|"; for(int j=0;j<10;j++) { cout<<box[j][i]<<"|"; } cout<<endl; } intx;cin>>x...

How do I handle special characters in a Java PrepareStatement?

In the following SQL query using the PreparedStatement class: String query_descrip = "insert into timitemdescription (itemkey, languageid, longdesc, shortdesc) values (?, 1033, ?,?)"; PreparedStatement pstmt2 = con.prepareStatement(query_descrip); pstmt2.setInt(1, rs4); pstmt2.setString(2, itemdescription); pstmt2.setString(3, itemdesc...

Mysql Create Database with special characters in the name

Hi All I want to create a database which name will have special characters in it. for example, (., - , _, @, #, $, %, &, *) can anyone provide any output on this? ...

Which are the valid control characters in HTML/XHTML forms.

Hello, I'm tring to create form validation unit that, in addition to "regular" tests checks encoding as well. According to this article http://www.w3.org/International/questions/qa-forms-utf-8 the allowed characters are CR, LF and TAB in range of 0-31, the DEL=127 in not allowed. On the other hand, there are control characters in rang...

Ruby: Replacing bullets pasted from MS Word

I need to remove bullet symbols from text pasted from MS Word, but I can't figure out what to match on. When printed to STDOUT the symbol displays as ⢠The ascii codes for these characters are 194 and 162. The ascii code for • symbols is 149 Any suggestions how to proceed either in JavaScript or Ruby code? ...

java inserting special characters with preparedstatement fails

I am using an HTML form which sends <input type=hidden name=longdesc value='SMARTNET%^" 8X5XNBD'> this is done by the following javascript code: function masinsert(id) { var currentTime=new Date(); var button = document.getElementById("m"+id); button.onclick=""; button.value="Inserting"; var itemdescription = document.ge...

Need to alter regex to allow for special characters

Hi, I have the following bit of code in my htaccess that will allow a users ID to only be alphanumeric and include underscores and hyphens: RewriteRule ^([A-Za-z0-9_-]+)$ profile.php?ID=$1 [QSA,L] I've recently imported over 1000 usernames from a social networking platform that allowed usernames to contain special characters, but this...

Tab and return character sequences for solaris ?

Is tab character in "\t" or "\r\t" in Solaris ? And the new line character sequence \n or \r\n ? thanx ...

Converting Symbols, Accent Letters to English Alphabet.

Dear friends, 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 v...

Method to substitute foreign for English characters in Java?

In PHP I would use this: $text = "Je prends une thé chaud, s'il vous plaît"; $search = array('é','î','è'); // etc. $replace = array('e','i','e'); // etc. $text = str_replace($search, $replace, $text); But the Java String method "replace" doesn't seem to accept arrays as input. Is there a way to do this (without having to resort to a f...

T-SQL match special characters. Pre should match Pré.

I have a list of company names and the user has to enter his company name to get into the system. Let's say we have the company "Pré ABC", now I want the user to be able to type "Pre" or "Pré". First I thought this was build-in functionality of the LIKE statement, but unfortunately it isn't. Any thoughts? ...

How to escape a square bracket for Pattern compilation

Hello guys. am new to regular expression. I have comma seperated list of regular expressions like: .{8},[0-9],[^0-9A-Za-z ],[A-Z],[a-z]. I have done a split on the comma. Now am trying to match of this regex against a generated password. The problem is that Pattern.compile does not like square brackets that is not escaped. Can some plea...

how can I use a different line termination for reads in php?

I'm trying to read a CSV file generated by M$ Excel on linux. The file has quoted multi-line (x0A separated) columns and a 0x0d0a line termination. PHP on Linux uses 0x0a as line terminator, so all the line-based tools (file, fgets, fgetcsv) thinks there are record breaks in the middle of the data cells. Short of processing the file ...

Trouble using/displaying special characters from Oracle db in .Net app

I have a C#.Net application that accesses data from a commercial application backed by an Oracle 10 db. A couple of fields in the commercial app's database (declared as varchar2(n)) contain special characters. The "smart quote" apostrophe, for example. The commercial client app displays these characters correctly, but my application i...

why "»" shows as a question mark("?") in my page?

Is there any restrictions for it to show normally? ...

XML documents and & char?

Hi Girls and rest, I have a question for XML document special chars, I'm using & in on of the value of the item in XML and TXMLDoc Delphi parser is complaining about it. I search for some XML parsing options but none of them concerning special chars, any ideas? Example: <Configuration> <Configuration_item> <view_...