special-characters

JSON htmlentities javascript

Hi! I am using an XMLHttpRequest to POST a JSON string to PHP. The JSON object is created in JavaScript and using the JSON2.js from json.org to create an JSON string representing the object. JSON.stringify(object); Whenever the object contains a string which has a special character in it, e.g. é, JavaScript does not give any error but...

NSPredicate of special characters - iPhone

Hi everyone, I'm trying to make a predicate that includes special characters For example: [[myIngredients filteredSetUsingPredicate:[NSPredicate predicateWithFormat:@"name BEGINSWITH[c] %@", [alphabet objectAtIndex:idx]]]; Here I will get all the ingredient which starts with (let say for idx = 5) 'e'. As I have to do my app in englis...

.aspx character coding

I am having an problem. First time working with a windows server, do you know if there is any problem in character coding? My document is set to content="text/html; charset=UTF-8" but it's giving me funny words... you can check it here. This site is a pure HTML with few includes but anything else is just HTML. I can convert them to HTM...

LaTeX at symbol

What does the @ symbol mean in LaTeX? I'm looking at the source of apa.cls, and there's a declaration: \newsavebox\gr@box and later on \sbox\gr@box{\includegraphics[width=\linewidth]{#2}}. It seems like @ isn't acting as a normal character, but I can't figure out exactly what it's doing, and couldn't find anything after bit of goog...

Regex, encoding, and characters that look a like

First, a brief example, let's say I have this "/[0-9]{2}°/" regex and this text "24º". The text won't match, obviusly ... (?) really, it depends on the font. Here is my problem, I do not have control on which chars the user uses, so, I need to cover all possibilities in the regex /[0-9]{2}[°º]/, or even better, assure that the text has ...

C# - File Encoding Problem.

Hello, I'm have a StringBuilder that is writing content to a file. Towards the end of each file, I'm writing the copyright symbol. Oddly, I have noticed that whenever the copyright symbol is written, it is preceeded by a "Â". My code that generates the content of the file looks like this: using (StringWriter stringWriter = new StringWr...

Java UTF-8 to ASCII conversion with supplements

Hi, we are accepting all sorts of national characters in UTF-8 string on the input, and we need to convert them to ASCII string on the output for some legacy use. (we don't accept Chinese and Japanese chars, only European languages) We have a small utility to get rid of all the diacritics: public static final String toBaseCharacters(f...

HTML Purifier Special Characters Question?

How do I display this in © html purifier instead of this all the time ©. In other words how do I display both in html purifier http://htmlpurifier.org/? ...

removing special characters in asp

hi, I want to identify special characters and remove that special characters from my string or a word for example O'neil - i want to remove (') from this word. Muñoz, A. Patrick - i want to remove above character of n (ñ) similarly i want to remove all special characters from my strings. I want to do this in asp How can i do thi...

prevent escaping special characters on textnode(JS-HTML)

Hello i followed this snippet http://bytes.com/topic/javascript/answers/504399-get-all-text-nodes var xPathResult = document.evaluate( './/text()[normalize-space(.) != ""]', document.body, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); for (var i = 0, l = xPathResult.snapshotLength; i < l; i++) { var textNode = xPathResul...

How can I get Velocity to output a greater than / less than without escaping it?

I'm trying to get Velocity to output the following Javascript code: if ((whichOne+1) <= numCallouts ) { whichOne = whichOne + 1; } else { whichOne = 1; } Whenever I try to get Velocity to print a > or a <, it represents it as a & gt; or & lt;, which doesn't help me since I'm trying to get it to produce Javascript. I've tried: #s...

PHP - How to insert special characters into a database?

Hello. Can anyone tell me how to insert special characters into a MySQL database? I've made a PHP script which is meant to insert some words into a database, although if the word contains a ' then it wont be inserted. I can insert the special characters fine when using PHPmyAdmin, but it just doesn't work when inserting them via PHP. Cou...

Problem with literal arguments in the PATTERN string for a python 2to3 fixer

Hi folks. I'm writing a fixer for the 2to3 tool in python. In my pattern string, I have a section where I'd like to match an empty string as an argument, or an empty unicode string. The relevant chunk of my pattern looks like: (args='""' | args='u""') My issue is the second option never matches. Even if it's alone, it won't match. Ho...

Html Entity code for ž

What is the HTML entity code for ž? I am looking for something similar to &raquo; instead of something like &#x17E;. ...

JavaScript: count minimal length of characters in text, ignoring special codes inside

I want to ignore counting the length of characters in the text if there are special codes inside in textarea. I mean not to count the special codes characters in the text. I use special codes to define inputing smileys in the text. I want to count only the length of the text ignoring special code. Here is my approximate code I tried to ...

Javascript: converting special characters of the form %XX%XX?

I have a bunch of characters which are encoded in the form %XX%XX. How can I display the actual characters with Javascript? Examples of the characters are... what I have / what I want %C5%93 / œ %C3%A6 / æ %C3%9F / ß Thanks for the help! ...

How to encode special characters for a POST with Spring/Roo

I'm using Spring/Roo for an app server, and need to be able to post some special characters. Specifically, characters like the Yen symbol, or Euro symbol. When I receive these characters on my server, and display them in console, they appear as "?". How can they be properly encoded and received? ...

Special Characters on Console

I've finished my poker game but now I want to make it look a bit better with displaying Spades, Hearts, Diamonds and Clubs. I tried this answer: http://stackoverflow.com/questions/2094366/c-printing-ascii-heart-and-diamonds-with-platform-independent Maybe stupid but I try: cout << 'U+2662' << endl; I don't know how to write it. ...

How can I end a property with a question mark in C#?

I'm sure this information is available in the C# spec, but I thought I'd give y'all a chance to set me straight. Why won't this code compile? namespace DataObjects { class QuestionMark { public bool Possible? {get; set;} } } Is there any way I can make my boolean properties end in a question mark? I think it would ...

[ASP.NET] How can I HTML-encode a string and use human-readable encoded tags (ex: &ecirc; instead of &#234; )

Greetings, I'm looking for a way to encode a string into HTML that uses human-readable tags such as &ecirc; (=ê). At the moment, I am using the HttpUtility.HtmlEncode() function, but it appears to return numbered tags instead of human-readable ones. For example: Dim str as string = HttpUtility;HtmlEncode("vente - en-tête") 'Expected: ve...