Solved

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

Posted on 2012-03-23
4
361 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Timer on div 5 22
Table doesn't show the lines! 3 23
CSS - how to make button/link change to black on hover? 2 15
Table header must be on top 2 22
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

740 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