character-encoding

Spring 3 MVC: How to store € symbol from form?

Hi there, I am using Spring 3 MVC and MySQL 5 as my DB. I have created a form using Spring form tags for updating an object in my database. I enter "Ticket price: €35" into one of this form's text input fields and save the item. Then when I view the item in a display page, the text appears as "Ticket price: ?35". If I enter "Ticket ...

Convert utf8 to latin1 in PHP. All characters above 255 convert to char references.

I need to convert text in UTF-8 into text encoded in ISO-8859-1 such that any character that are not part of ISO-8859-1 set would turn into character references. (ex β) Example: I want to turn text like hello é β 水 into hello é β 水 I am doing all this in PHP. I tried built-in functions, iconv, and tidy and combina...

How can I find the encoding of a mail message?

I'm downloading a message from gmail using pop3. When the message is in ansi every thing is OK but when there is another language I get gibberish Any ideas? Thanks Asaf ...

How to convert from ISO-8859-1 to UTF-8 a webpage in java/groovy

I want to read a webpage A in ISO-8859-1 charset, according to the browser, and return the content in UTF-8 as a content of the webpage B. This is: I want to show the content of the page A in the same charset that I use to show the rest of the page B, that is UTF-8. How do I do this in java/groovy? thanks in advance ...

How do I remove  from the beginning of a file?

I have a CSS file that looks fine when I open it using gedit, but when it's read by PHP (to merge all the CSS files into one), this CSS has the following chars prepended to it:  PHP removes all whitespace, so a random  in the middle of the code messes up the entire thing. As I mentioned, I can't actually see these chars when I ope...

RSS reader Error : Input is not proper UTF-8 when use simplexml_load_file()

Hi Dear All, I'm using simplexml_load_file method for parsing feed from external source. My code like this $rssFeed['DAILYSTAR'] = 'http://www.thedailystar.net/latest/rss/rss.xml'; $rssParser = simplexml_load_file($url); The output is as follows : Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.thedailysta...

html entities decoding in php

I seem to be completely unable to get around utf-8 character encoding. So I'm exporting content from a database as a utf-8 xml file. The software I am importing into is quite strict about character encoding, so I can't just put everything in CDATA tags. There's a whole bunch of weird characters, e.g. , already in the data. These are...

How to get ascii value of character in haskell?

Just wondering how to get ascii value of character in haskell? I've tried to use the 'ord' function in ghci, based on what i read here: http://haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Data-Char.html#6 GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading pac...

SQL ENCODING IN SQL Management studio

Hi all We have tri-lingual system at work, english,greek and russian. I have an issue with russian when i update some of the fields in my database. If i use an update query to update a field form the default english to russian i get '?????????' instead of the russian characters.if i update directly by hand it shown correctly. Help! ...

Encode data for easy passing over phone

I need to encode some data (text) so that it can easily be passed by the user over phone. The text contains random characters and is normally not longer than 100 chars. Example: "37-b,kA.sZ:Bb9--10.y<§" I'd like to encode this text into more human readable form so that it can easily be passed over phone. Base36 produces a text that...

Python: Why does the tab character show up weird in Tkinter?

This a screenshot from a Tkinter Listbox in a program I'm writing: Why does the \t character show up as a black bar? On a Mac it shows up normally (as a tab), but on Windows I get this. I think it might have something to do with character encoding because strings are unicode by default in OS X but not Windows? I tried writing the ta...

SvnLook with unicode Ouptut

Hi ! On Windows Vista, with Subversion 1.6.12 setup throught VisualSvn Server 2.1.3, I have the following output Commentaires AccentuÚs. Instead of Commentaires Accentués. with the command (in a dos or powershell console in admin mode) svnlook log "D:\MyRepo" I've tried with other subversion binaries distribution (silksvn) and...

XDocument.Save creating 3 bad characters in XML

Hi when I do this: using (XmlWriter xw = new XmlTextWriter(fcService.SetCIRIFilePath(), Encoding.UTF8)) { debts.Save(xw); xw.Flush(); } My debts object is a XDocument object which I populated using LINQ to XML. However when I save it, it looks fine in notepad, but when opened with a binary/hex e...

How to format incoming email text for HTML display

I've set up a script that processes incoming emails and creates blog entries on Blogger. I'm using PEAR's Mail_Mime libs (for now) to read the incoming message. The messages often have characters in them that cannot be read by browsers--this happens most often when people use Outlook or cut/paste from MS Word. So the output at the othe...

PHP + MySQL encoding issues for Portuguese (PT-Br)

I'm developing a website in Brazilian Portuguese and I'm facing some really annoying encoding problems. Words that should be written this way: óbito are being written this way: �bito I have noticed that while the texts are still at the database they are ok. But when I use echo with PHP, the encoding problem comes up. List of things I ...

HttpServletRequest - setCharacterEncoding seems to do nothing

I am trying to read UTF-8 info from the request. I used "request.setCharacterEncoding("UTF-8");", but it seems to do nothing - the info read is non UTF-8. What am i doing wrong? ...

Problem with special characters after migrating a web project

I had several HTML files on an Apache server which had special characters. For example, they have instead of &copy;. They were working fine but once I migrated those files to a new server (also Apache), all those characters are not properly being displayed in the browser. I know it'd be better to replace those characters with HTML enti...

Difference between MBCS and UTF-8 on Windows

I am reading about the charater set and encodings on Windows. I noticed that there are two compiler flags in Visual Studio compiler (for C++) called MBCS and UNICODE. What is the difference between them ? What I am not getting is how UTF-8 is conceptually different from a MBCS encoding ? Also, I found the following quote in MSDN: Uni...

How to write special characters into MySQL via PHP?

In my database in some fields the data is showing like as in following screenshots: http://i31.tinypic.com/2637l9f.jpg http://i27.tinypic.com/1ihh6d.jpg http://i26.tinypic.com/2yklzb4.jpg http://i31.tinypic.com/2vbshtf.jpg I used mysql_real_escape_string while inserting my data into database and htmlspecialchars while displaying. ...

MySQL - how to get english and encoded characters inserted?

I have a multi language website which requires both English language and Azeri characters to be input via a web form and inserted into a MySQL database table. Displaying them in HTML is fine, I can work with the page encoding to get hard coded text to display. Now the site requires developing and any static text will be pulled from the ...