Solved

£ symbol it gets converted to £ when exported to MS Excel from JSP

Posted on 2012-03-23
4
363 Views
Last Modified: 2013-10-09
We use the displaytag tag library to export data from JSP to MS Excel. When we encounter the pound symbol in the data £, it gets converted to £. Thus an amount of £5.00 looks like £5.00.

I tried to extend the ExcelView class of the displaytag tag library and overrode protected String escapeToColumnValue(Object value) and remove the rogue character but it again comes back when the data is exported into excel.
0
Comment
Question by:ruchiabhi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 5

Accepted Solution

by:
dcowley earned 500 total points
ID: 37763346
When I've seen problems like this historically it's been related to a mismatch in the character encoding of the source and destination, typically from a UTF-8 encoding to something else.

So in this case, you might want to try to convert the £ into a different encoding, perhaps ASCII encoding and see if that resolves the issue.

It would also depend I suppose on how you're currently encoding the symbol, whether it's a named entity, or if you're using a particular character code.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37765129
it's as dcowley explained: your jsp has to ensure that the data it reads from the backend is converted to a proper character set understood by the browser *and* that the web server anounces this character set properly (HTTP header *and* META tag in HTML)
then, if the browser sends back such data, you need to make the mapping reverse
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question