character-encoding

latin1/unicode conversion problem with ajax request and special characters

Server is PHP5 and HTML charset is latin1 (iso-8859-1). With regular form POST requests, there's no problem with "special" characters like the em dash (–) for example. Although I don't know for sure, it works. Probably because there exists a representable character for the browser at char code 150 (which is what I see in PHP on the serve...

Google App Engine datastore encoding?

I'm using the GAE datastore for a Java application, and storing some text that will be in numerous languages. In my servlet, I'm first checking to see if there's any data in the data store, and, if not, I'm creating some, similar to the following: ArrayList<Lang> list = new ArrayList<Lang>(); list.add(new Lang("EN", "English", 1)); lis...

ASP.NET 3.5 Page character encoding problem

Hello everyone. I have a problem in my asp.net 3.5 application (C#) when I try to render in my pages characters like 'è' which are shown in a very strange manner (if i'm lucky i get a ? mark in my web page). in fact Expression Web, when i open my web site, substitutes the è char with �... How can I tell asp.net that I want to use a parti...

Coldfusion not converting accented text or MS Word chars

Running Coldfusion 8, I am trying to clean text input before saving to a database that will take things like the MS equivalent of ' " - and accented letters, and converting them. I have tried replace, REReplace, and various UDFs found on the internet. None seem to work. In fact, I tried this: <cfscript> function cleanString(string)...

UTF-8 character encoding battles json_encode()

Quest I am looking to fetch rows that have accented characters. The encoding for the column (NAME) is latin1_swedish_ci. The Code The following query returns Abord â Plouffe using phpMyAdmin: SELECT C.NAME FROM CITY C WHERE C.REGION_ID=10 AND C.NAME_LOWERCASE LIKE '%abor%' ORDER BY C.NAME LIMIT 30 The following displays expected va...

Dreaded python encoding errors, how to stop them?

These have been plaguing me endlessly. Why? It seems that my console can't handle the encoding. I take it that the my browser and word processor can handle it. I don't have a master list of all the possible characters that it's choking on. What is the best way to relieve this without modifying my data? 'charmap' codec can't encode chara...

Is there a list of language only character regions for UTF-8 somewhere?

I'm trying to analyze some UTF-8 encoded documents in a way that recognizes different language characters. For my approach to work I need to ignore non-language characters, such as control characters, mathematical symbols etc. Just trying to dissect the basic Latin section of the UTF standard has resulted in multiple regions, with charac...

feedparser fails during script run, but can't reproduce in interactive python console

It's failing with this when I run eclipse or when I run my script in iPython: 'ascii' codec can't decode byte 0xe2 in position 32: ordinal not in range(128) I don't know why, but when I simply execute the feedparse.parse(url) statement using the same url, there is no error thrown. This is stumping me big time. The code is as simple ...

Does a servlet knows the encoding of the sent form that specified using http-equiv?

Does a servlet knows the encoding of the sent form that specified using http-equiv? When I specify an encoding of a POSTed form using http-equiv like that: <HTML> <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'/> </head> <BODY > <form name="form" method="post" > <input type="text" name="v_rcvname" value="...

problem with reading arabic in jsp page?

I have a column in the PostgreSQL database which contains Arabic data. When reading the data from the database in the controller it's been read fine, the encoding is good, but when sending the data to the JSP page and trying to read it, they appears as something like ?????????. Any ideas why something like this occur? ...

How to unescape special characters from BeautifulSoup output?

Hi, I am facing issues with the special characters like and which represent the degree Fahrenheit sign and the registered sign, when i print the string the contains the special characters, it gives output like this: Preheat oven to 350&deg; F Welcome to Lorem Ipsum Inc&reg; Is there a way I can output the exact characters and n...

How to define a string literal containing non-ASCII characters?

I'm programming in VB.NET using Visual Studio 2008. I need to define a string literal containing the character "÷" equivalent to Chr(247). I understand that internally VS uses UTF-16 encoding, but when the source file is written to disk it contains the single byte value F7 for this character. This source file is processed by another pro...

PHP Include and accents (They show up as �)

I'm using PHP include to include a PHP file that has HTML in it. some of the content has french accents and these show up as � on the site. How can this be solved? Thanks Here is the PHP file I include: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html di...

Eclipse javascript character encoding

Hi, I'd like to display some language specific characters from javascript but I can't. My app is a Java webapp and the front end is jQuery. All the characters that are sended from the server - in a JSP or with AJAX - are displayed properly. When I want to display some text hardcoded in to the javascript file it's broken. I'm using Ecl...

Restoring a utf8 encoded database to an iso 1 server - effect on strings

We are doing a migration of our Sybase database that has a utf8 encoding to a server with iso 1 encoding. We are just using char and Varchar for our strings. Will doing backup and restore not truncate any strings? I was thinking that Char and Varchar are just single byte characters. ...

How do I configure encodings (UTF-8) for code executed by Quartz scheduled Jobs in Spring framework webapps?

I wonder how to configure Quartz scheduled job threads to reflect proper encoding. Code which otherwise executes fine within Springframework injection loaded webapps (java) will get encoding issues when run in threads scheduled by quartz. Is there anyone who can help me out? All source is compiled using maven2 with source and file encod...

results show well in the class file, but show strange characters when I include it in the main system?

I am currently building a blog system, and the class file i.e class Blog{}, is running ok, when I try it on its own, but, when I try to use it in the pages of the site that have css, it looks weird and full stop, and apostrophes are replaced by strange characters! please help, this is my first time of using oo for development, ...

How to convert character names to character codes on linux

Hello! I'm looking for a way to convert the character names found in the files in the /usr/share/X11/xkb/symbols/ folder like: key <AE01> { [ 1, copyright, registered, trademark ] }; key <AE03> { [ 3, numbersign, section, paragraph ] }; key <AE04> { [ 4, EuroSign, dollar, sterling ] }; key <AE11> { [ masculine, ordfeminine, dead_circu...

How can I encode a Perl string so I can put it into an XML document?

I'm not too fluent with the perl XML libraries (actually, I really suck at understanding encoding in general), all I'm doing is taking a string that possibly has characters such as "à" and putting it in an XML file, but when I open the file, I get an encoding error at the line containing such a character. So I just need a lightweight wa...

broken UTF-8 String ruby

While reading a file I get broken UTF-8 String error whenever I have the following in my file través if I change it to normal e then it works. Whats the way to fix this? error only happens if I do line.lstrp or any other function. Just printing the lines is ok. problem even happens when I try to match the string with regex. ...