forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dr. Bhatia Praveen" <praveen.bha...@sumpurn.com>
Subject RE: Japanese characters transform from doc to html
Date Tue, 17 Jun 2008 12:03:56 GMT
Hi,
  Worked. Thanks.
Praveen 

-----Original Message-----
From: Thorsten Scherler [mailto:thorsten.scherler.ext@juntadeandalucia.es] 
Sent: Tuesday, June 17, 2008 8:48 PM
To: user@forrest.apache.org
Subject: Re: Japanese characters transform from doc to html

On Sat, 2008-06-14 at 00:32 +0900, Dr. Bhatia Praveen wrote:
>  
> 
> Hello,
>   I use an [1] xml file -> [2] transformed to doc by xslt -> 
> [3]transformed to xml by my sitemap pipeline -> [4] transformed to 
> html by forrest.
>  The relevant string that gets transformed in this process is as 
> follows (Please note these are Japanese character strings):
> [1]
>       <set lang="japanese">
>        <ques> Japanese string1 <ques>
>         <ans> Japanese string2 </ans>
>       </set>
> At [3} these strings after transformation looks correctly like:
> - <li>
>   <a href="javascript:sayText(" Japanese string1",1,12,3)"> Japanese 
> string2</a>
>   </li>
> At [4] in html source it looks like:
> <a class="external" href="javascript:sayText(%22%E6%97%A5%  .....
> ETC,  ,1,12,3)"> Japanese string2 </a>
>  
> Hence Japanese string1 at the href location got converted to strange 
> characters...
>  
> Problem: Till step [3] the transformation is correct in Japanese. At 
> step [4] the the href= portion's Japanese has become special 
> characters while the value place japanese is in normal Japanese. My
> sayText() library function can't interpret these characters and 
> requires normal Japanese there.
>  
> What can I do to get the normal Japanese at the href= location after 
> the transformation to html from forrest site?


Actually that is a bit cumbersome and I recommend to not directly use the
japanese character in the href attribute. The problem is that the attribute
href will be encoded via the link rewrite.

Workaround:

<a href="javascript:sayText("string1",1,12,3)

and in your script:

function sayText(a,b,c,d){
 if (a =="YourJapaneseString"
}
...

This is not the most beautiful solution but will work.

HTH

salu2

>  
> thanks
> Praveen
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions



Mime
View raw message