2 Replies Latest reply: Jul 21, 2009 12:11 AM by 843810 RSS

    Displaying Arabic Text in JSP

      Hi All,

      Am developing an application which supports English & Arabic Languages.
      But in Arabic case, the pages shows junk values eg:???? after server hit.
      eg:- I typed some arabic text in textbox & click submit button, after server hit
      if any eeror occured it redirects to the same JSP page, in that case some junk
      values are displayed on my textbox.

      am using


      Please help me to solve this issue.
        • 1. Re: Displaying Arabic Text in JSP
          [Character Conversions from Browser to Database|http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/]
          • 2. Re: Displaying Arabic Text in JSP
            In addition to the setting the character encoding to UTF-8 in request and response objects, i think doing the following steps might also help.
            1. Set the charset of your jsp to UTF-8 : <%@ page contentType="text/html; charset=UTF-8" language="java"%>
            2. Either Set the Collation of the DB column you are using to save the arabic field to Arabic OR change the DB column to NVARCHAR

            You might also want to refer to the following links

            Hope this helps :)