special-characters

Encoding in Ruby 1.8.7 or 1.9.2

I have been trying to use the gem 'character-encodings' which doesn't build in 1.9.2 however it does in 1.8.7 but even when I require 'encoding/character/utf-8' I still cant do the simplest of encoding. require 'encoding/character/utf-8' str = u"hëllö" str.length #=> 5 str.reverse.length #=> 5 str[/ël/] #=> "ël" I get ruby-1....

What's the difference between \n and \r\n?

They both mean "new line" but when is one used over the other? ...

Special Characters Problem

When I display contents from the database, I get this: ��Some will have a job. Others will want one. They are my people, they are my clients and they are being denied their rights. This text had been entered by the user via textarea with tinyMCE. How can I replace special characters (using preg_replace()) from the sentence to ' ' excep...

How to parse in VBA a string that contains Mathematics special ASCII code and correct it

Hi ! I'm currently writing a code in VBA to retrieve prices for some financial models. The problem I have is in the excel spreadsheet where I have special Ascii characters like ⅞ ¼ etc... I would need using VBA to transform this in 7/8 1/4 etc... How could I do that ? Thanks for your help ...

Python regex to convert non-ascii characters in a string to closest ascii equivalents.

I'm seeking simple Python function that takes a string and returns a similar one but with all non-ascii characters converted to their closest ascii equivalent. For example, diacritics and whatnot should be dropped. I'm imagining there must be a pretty canonical way to do this and there are plenty of related stackoverflow questions but I'...

How to Raise Keyboard Events for Special Characters/ Extended ASCII? (Visual Basic 6)

Hello everybody, How to a raise a keypress event for Special Character for typing extended ASCII Characters ? Sample code snippet : keybd_event vbKeyE, 0, KEYEVENTF_KEYDOWN, 0 Is there any alternative so that I can use KeyCode for Special character [ E.g. Chr$(122) ] instead of predefined and limited VbKeyA, VbKeyB, VbKeyC ..... etc...

Symbols, Special character display issue in wpf.

In WPF text block, I want to display special characters like diamond (♦) etc. It is displaying fine in some systems and in some systems, it is displaying a plain box instead of the symbol. Can somebody help me to resolve this issue. Thanks in Advance. -Elangovan. ...

python email special char

How can I send special character like registered symbol in a email's 'from' email string? E.g. Test® <[email protected]>. Do I require to set some headers? ...

Content-Disposition Special Characters

I have encountered an issue when trying to serve files with spanish tildes, related to the Content-Disposition encoding. The file name is "qué hacés ahora.docx" So far, the ASP.NET MVC way of serving files adds this header, which works fine only in Firefox: Content-Disposition: attachment; filename*=UTF-8''qu%C3%A9%20hac%C3%A9s%20ahor...

problem with special characters

I am retrieving articles from my blog to my webiste from the mysqlDb. The articles are displayed just fine on the blog but on the website some characters such as ţ,ş,ă etc are replaced with a black square with a question mark inside . I have "UTF-8" set on my document the same as on the blog. ...

PHP: Convert special characters to HTML character codes

Hey, I'm developing a CMS for a customer and he needs to edit stuff and use special characters such as ç and ®. However, I don't want him to have to enter the character codes like &reg;. Does anyone knows a good way to automatically convert those characters using PHP? Thanks! ...

PHP: htmlentities not working with variable

Hey, I'm using htmlentities() to convert characters like Ç and ® to its character codes. I'm getting the texts from the MYSQL database. while($row = mysql_fetch_array($array, MYSQL_NUM)){ echo "<div style='float:left; margin-right:40px;'> <div style='width:148px; height:141px; background-image:url(uploads/".$row[0].")'> <img src...

How to: remove part of a Unicode string in Python following a special character

Hi all first a short summery: python ver: 3.1 system: Linux (Ubuntu) I am trying to do some data retrieval through Python and BeautifulSoup. Unfortunately some of the tables I am trying to process contains cells where the following text string exists: 789.82 ± 10.28 For this i to work i need two things: How do i handle "weird" sym...

Special character use in Python 2.6

I am more than a bit tired, but here goes: I am doing tome HTML scraping in python 2.6.5 with BeautifulSoap on an ubuntubox Reason for python 2.6.5: BeautifulSoap sucks under 3.1 I try to run the following code: # dataretriveal from html files from DETHERM # -*- coding: utf-8 -*- import sys,os,re,csv from BeautifulSoup import Beauti...

Chemical symbol support on a textbox

I am developing an application that needs some kind of subscript and superscript support to display text that refers to chemical formula, if I do it in a textbox (winforms) and want for example show water formula, it would appear as H20 rather than H(subscript 2)O (sorry I coudn't find how to do it here). How could this be done? Thanks. ...

Invalid XML characters

I have a text file(UTF-8) file. Content of this file is extracted form rich text documents, it might be MS Word, PDF, HTML or any thing. I have to pass this content to a web service, but most of time it contain invalid characters like form feed or null. What happens now is when I pass the content of the file, containing invalid character...

JSF 2.0 request.getParameter return a string with wrong encoding

Hi, I'm writing an application in JSF 2.0 which supports many languages, among them ones with special characters. I use String value = request.getParameter("name") and POST method, the page encoding is set to UTF-8 and the app is deployed on apache tomcat 6 which has the connector set correctly to utf-8 in a server.xml file: <Connector...

CKEditor add more symbols

Hello! How can I add more "custom" symbols in the Insert Special Character panel please? Thank you. ...

&sect; character kills nsxmlparser

I've got an nsxmlparser. It works well enough, though I had to convert all the special characters coming into it into their coded equivalents: & had to be &amp;, " had to be &quot;, and so on. However, &sect; (§) kills it at parser:didStartElement. Do you know a way around this? Naturally, I need the § characters to show up. ...

Why are Html Entities replaced by MS Expression Web??

I'm using Microsofts Expression Web 5 to edit my HTML documents. I have noticed a strange behaviour when using the 'Reformat HTML' method. If my html document (UTF-8) contains html entities in the like of the entity is replaced by a euro character. The html entities with a special meaning like '<' and '>' will not be replaced. So '<' (...