Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

rendering problem in javascripts that wraped with cdata

  Asked By: Grant    Date: Nov 04    Category: Java    Views: 854
  

I use jsf and xhtml output for jsp pages
my problem is all javascript in jsp pages are wraped with cdata
and this is caused the unicodes(like farsi) that are included in the
javascripts are not rendered correctly ,like js validation scripts .
how can I resolve this problem.

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Ujala Hashmi     Answered On: Nov 04

what is the header of your XHTML page?
in which tag have you defined the unicode encoding?

 
Answer #2    Answered By: Robin Bailey     Answered On: Nov 04

Thanks arash for replies
The header of my xhtml page is like this:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:v="http://corejsf.com/validator">


when I user view source option of my browser then the ascii bytecode
of message viewable
//<![CDATA[
function confirmDelAction(){
return confirmDelete('آیا شما
از حذف
فعالیت null
مطمئن
هستید') ;
}
//
//]]>

 
Answer #3    Answered By: Oscar Evans     Answered On: Nov 04

the problem  is that you have never mentioned any where in your file that it is encoded in unicode.

 
Answer #4    Answered By: Michael Evans     Answered On: Nov 04

if the message was not complete in the before post
I use meta type tag for specifying that.
like this in the head of my pages


<head xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8;" />
</head>

Can you tell me what do need to happen for correctly rendering  or
code mapping

 
Didn't find what you were looking for? Find more on rendering problem in javascripts that wraped with cdata Or get search suggestion and latest updates.




Tagged: