-1

I am extracting some data from MongoDB and showing it to a webpage. I am using Java and Struts2 framework. Problem is, in Mongo console the letter é, is showing this. But, Eclipse console also showing é . In jsp page, I tried with

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%> 

but, no luck. Can anybody tell what is the problem and how can I solve it?

dur
  • 15,689
  • 25
  • 79
  • 125
sovon
  • 877
  • 2
  • 12
  • 28

1 Answers1

1

You need to set meta content="content-type" content="text/html; charset=utf-8"

Sameer Puri
  • 987
  • 8
  • 20
  • yes, but [here](http://stackoverflow.com/questions/4905074/how-do-i-configure-my-mongodb-to-take-utf-8-into-account) it's showing that the default is UTF-8 – sovon Aug 05 '16 at 20:03
  • Hmm my bad, I don't know why I wrote that now that I read it again. Did you already set ` meta content="content-type" content="text/html; charset=utf-8"`? – Sameer Puri Aug 05 '16 at 20:58
  • If that does not work, please try UTF-16, since u00E9 is UTF-16 – Sameer Puri Aug 05 '16 at 21:00
  • 1
    I'm not sure now either, it's an odd problem :/ Can you manually check the encoding on the webpage from the browser? – Sameer Puri Aug 09 '16 at 18:29