Solved

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

Posted on 2012-03-23
4
362 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

This article discusses how to create an extensible mechanism for linked drop downs.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to count occurrences of each item in an array.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

734 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