Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ajax request with Japanese characters

 
nuthan kumar
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am facing problem while submitting AJAX request with Japanese charter, in target page Japanese characters are not coming properly.
I am using below code to send Ajax request.


variable sParams contains Japanese characters.

 
Sagar Rohankar
Ranch Hand
Posts: 2904
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nuthan kumar wrote:


I'm afraid there is something called "charset" as request header value. Try setting "Accept-Charset(Content-Language = Response header)" and/or "Accept-Language" instead.
Reference: http://en.wikipedia.org/wiki/List_of_HTTP_headers
 
nuthan kumar
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried with "Accept-Charset" setting, still no luck
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most of the time when I have encoding issues, it is because the server is not properly setting the headers for the content or the characters are not encoded correctly.

Eric
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic