• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems with Charset

 
Guilherme Mendes
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys!

I have a problem with mi application with the page encoding in firefox. I need to verify the charset of the page, and, when I try to get the current charset I receive an exception:
In other browsers it is ok. I have tested it on IE, Chrome, Safari and Opera. All of them are ok. Anyone has an idea about where is my problem?

Thanks!
 
Paul Clapham
Sheriff
Pie
Posts: 20976
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try declaring the charset as "UTF-8" without a semicolon at the end.
 
Guilherme Mendes
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Try declaring the charset as "UTF-8" without a semicolon at the end.


Well i do not have it in my code... i really don't know what is happening
 
Paul Clapham
Sheriff
Pie
Posts: 20976
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guilherme Mendes wrote:Well i do not have it in my code... i really don't know what is happening


Neither do I. So why don't we start again and you can provide the details which would be necessary for a second person to have some idea of what your question is about. Read TellTheDetails (follow the link) to see what I mean.
 
Guilherme Mendes
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:
Guilherme Mendes wrote:Well i do not have it in my code... i really don't know what is happening


Neither do I. So why don't we start again and you can provide the details which would be necessary for a second person to have some idea of what your question is about. Read TellTheDetails (follow the link) to see what I mean.


Sorry for the late to answer, I was not working these days, and I was without internet access. I will try to explain better my problem.

I need a page with charset ISO-8859-1, to handle with this in my java code. To force this, I am using the following code: But when I try to check if the encode is ISO-8859-1, I get the error in the first post. I think the firefox is sending in the charset string UTF-8 plus the ISO-8859-1, separated by a dot-comma. I am having troubles to debug it in my WSAD to confirm the information, but it is looking like this. I will try to debug it again later, but I don't know if I will successfully do this.

Sorry for the poor english...
 
Paul Clapham
Sheriff
Pie
Posts: 20976
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand. You have a variable named "http_request" whose name makes me think you are trying to assign headers to an HTTP request. That makes me guess that it's a Javascript variable and you're doing this in some kind of AJAX context... but I shouldn't have to guess. I already directed you to our TellTheDetails page, I thought?

And you seem to have chosen some random names for your HTTP request headers, if that's what they are. You shouldn't have to guess either, since the Internet is full of places which tell you what you can use. The first link I found was the Wikipedia article about HTTP headers: List of HTTP header fields, but there are many more.

By the way, you still didn't post the full stack trace of the error message which you originally complained about. "Stack trace" is one of the items in the checklist at the beginning of the TellTheDetails article.
 
Guilherme Mendes
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved. The bug was an extra ';' in the call.

I was using instead of Now it works! Thank you Paul for trying to help me!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic