special-characters

JBoss equivalent to Apache's unescapeHtml?

Does anyone know a JBoss equivalent to Apache's unescapeHTML(String) function? ...

PHP Special Characters Test

What's an efficient way of checking if a username contains a number of special characters that I define. Examples: % # ^ . ! @ & ( ) + / " ? ` ~ < > { } [ ] | = - ; I need to detect them and return a boolean, not just strip them out. Probably a super easy question but I need a better way of doing this than a huge list of conditionals ...

Java, UnmarshallingException caused by XML attribute with special chars: ;ìè+òàù-<^èç°§_>!£$%&/()=?~`'#;

Hi, my xml file has a tag with an attribute "containsValue" which contains the "special" characters you can see in the subject: <original_msg_body id="msgBodySpecialCharsRule" containsValue=";ìè+òàù-<^èç°§_>!£$%&/()=?~`'#;" /> in my xml schema the attribute has xs:string: <xs:attribute name="containsValue" type="xs:string" /> ...

Strange characters and encoding while using twitter API

I begun developing my own SIMPLE twitter client in my server (to bypass twitter.com blocking rule stablished by some dumbass at govt. office) Please check this image so you can see the accented characters converted into weird symbol: It is being developed with this class Twitter PHP class by Tijs Verkoyen This is my heading code, ...

Quote POSIX shell special characters in Python output

There are times that I automagically create small shell scripts from Python, and I want to make sure that the filename arguments do not contain non-escaped special characters. I've rolled my own solution, that I will provide as an answer, but I am almost certain I've seen such a function lost somewhere in the standard library. By “lost” ...

Remove special chars from a File

I'm trying to open a textfile and remove all the special chars ñ Ñ ' á í etc... the file its a Layout that the clients send to me and i parse it to send the file to an AS400 server but i have to remove all special chars. THE PROBLEM IS: some files with some special chars when i open it in c# it read the special chars and Two different...

Escape characters in MySQL, in Ruby

I have a couple escaped characters in user-entered fields that I can't figure out. I know they are the "smart" single and double quotes, but I don't know how to search for them in mysql. The characters in ruby, when output from Ruby look like \222, \223, \224 etc irb> "\222".length => 1 So - do you know how to search for these in m...

Problem between Glassfish and Spring Security Basic Authentication

Hi! I am enabling a simple HTTP Basic Authentication with Spring security in my project. My environment is an Glassfish Server (bundled with Netbeans), and almost everything works perfect: I have set up it to just ask for authentication with the POST method, with hardcoded users with "user-service", and it works with user names with no s...

I need to use "ö","ä"."ü" in my program, but java/android won't let me

Hi all, I need my program to send a request to a server. The problem is, the server only recognizes ös,äs und üs, but JAVA and/or Android don't know them. `How can I send a request with a String like "Hermann-Löns" without JAVA/Android "changing" the ö.... Oh and btw., "oe" isn't recognized by the server too, already tried that... thx f...

Replacing ’ character in PHP

Hello, I'm having a hard time trying to replace this weird right single quote character. I'm using str_replace like this: str_replace("’", '\u1234', $string); It looks like I cannot figure out what character the quote really is. Even when I copy paste it directly from PHPMyAdmin it still doesn't work. Do I have to escape it somehow? ...

Special character in "entrée" cannot be displayed correctly if defined in a separate javascript file

Example: The following string is defined in a json.js file. var test = "One complimentary entrée with the purchase of an entrée."; It is included in an index.html file by <script type="text/JavaScript" src="./json.js"></script> When the string is displayed in UI, it shows up as "One complimentary entr�e with the purchase of an...

Outputting an HTML entity character from a helper function

I am using Symfony 1.3.2 on Ubuntu. I have written a little helper function (statsfoo) that prints out summary statistics about an item. I am using the helper function in my template like this: // In StatsHelper.php <?php function statsfoo($some_param) { return "<div class=\"sfoo\">&9830; the stats number for item is 42</div>" } //...

Converting html entities into their values in python

I use this regex on some input, [^a-zA-Z0-9@#] However this ends up removing lots of html special characters within the input, such as #227;, #1606;, #1588; (i had to remove the & prefix so that it wouldn't show up as the actual value..) is there a way that I can convert them to their values so that it will satisfy the regexp exp...

what does # character means in JNDI lookup?

hi every one does any one know that "what does '#' character means in JNDI look up?" like: helloUser = (HelloUser) ctx.lookup("HelloUser#ejb3inaction.example.HelloUser"); thanks a lot ...

Alt attribute encoding with JavaScript

Hi, Html entities must be encoded in alt attribute of an image in HTML page. So <img id="formula" alt="A &rarr; B" src="formula.png" /> will work well. On the other hand, the same JavaScript code will not work document.getElementById('formula').alt = 'A &rarr; B'; and will produce A &rarr; B instead of A B. How to do it through...

Hyphen vs Dash : Replace Dash with Hyphen

Alright so we had a problem recently In reporting services some of the String Columns were appearing as gibberish Chinese characters. On further investigation we found it is the hyphen. Well that's what we though first. On further investigation we found it a dash (or en dash) . Basically the reason this has happened is people copy pas...

Handling Special char such as ^ÛY, ^ÛR in java

Hi, Has anybody encountered special char such as ^ÛY, ^ÛR ? Q1. How do I do an ftp of the files containing these chars? The chars are not seen once I do a ftp on AIX (bi or ascii) and hence I am unable to see my program to replace these, working. Q2. My java program doesn't seem to recognise these or replace these if I search for th...

Replace symbol "%" with word "Percent"

Hi, How to replace symbol "%" with a word "Percent". My original string is "Internal (%) External (%)". The string should be "Internal (Percent) External (Percent)" Using regular expression, how I can replace this symbol? Thanks in advance. Atul ...

Separate string by tab characters

I have a text file that is tab-delimited. How can I separate this string into substrings for an array by detecting the tabs? ...

Does the XML specification states that parser need to convert \n\r to \n always, even when \n\r appears in a CDATA section?

Hi, I've stumbled in a problem handling the \line-feed and \carriage-return characters in xml. I know that, according to http://www.w3.org/TR/REC-xml/#sec-line-ends, xml processors are required to replace any "\n\r" or lone "\r" sequences with "\n". The specification states that this has to be the behaviour for handling any "external pa...