This discussion is archived
0 Replies Latest reply: Jan 20, 2012 3:23 AM by 912281 RSS

When calling from hindi properties file a unicode is genarating.

912281 Newbie
Currently Being Moderated
Hi ,
Am using weblogic poratl platform. I have set all charrset to UTF-8. but while getting hidi output a unicode is generating.
here is the code please suugest what shoul i do

index.jsp_

<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
<%@ taglib prefix="i18n" uri="http://www.bea.com/servers/p13n/tags/internationalization" %>
<script type="text/javascript" src="js/common-234.js"></script>
<script type="text/javascript" src="js/tabbed.js"></script>
<script language="javascript" src="js/dropdown_menu.js"></script>
<script language="javascript" src="js/modal_window.js"></script>

<script type="text/javascript" src="js/common-234.js"></script>
<script type="text/javascript" src="js/tab_control.js"></script>
<script language="javascript" src="js/dropdown_menu.js"></script>
<link href="css/multistyles.css" type="text/css" rel="stylesheet" />
<link href="css/multistyles.css" type="text/css" rel="stylesheet" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<netui:html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


<script type="text/javascript" src="js/common-234.js"></script>
<script type="text/javascript" src="js/tab_control.js"></script>
<script language="javascript" src="js/dropdown_menu.js"></script>
<link href="css/multistyles.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
     <!--
     function showMe (it, box) {
     var vis = (box.checked) ? "block" : "none";
     document.getElementById(it).style.display = vis;
     }
     //-->
</script>
</head>

<netui:body >

<i18n:localize bundleName="<%=PunjabiConverter.PropertiesConstant.RESOURCE_BUNDLE_FILENAME%>"/>


     
<h1>Form </h1>


<netui:form action="edit" method = "post" tagId="form">

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="frmtable">

<tr><div class="pagesubmission">
     <netui:button type = "submit" value="English " />
     </div>
     </netui:form>
     <netui:form action="edit11" method="post" tagId="form">
     <div class="pagesubmission">
     <netui:button type = "submit" value="Punjabi " />
     <i18n:localize charset="utf-8"/>
     </div>
     </tr>
     </table>
     <tr>
<td align="center" class="label"> <i18n:getMessage messageName="Name" /> <span style="color:Red" class="captionInRed">*</span></td>
<td width="100%"><netui:textBox dataSource="pageFlow.name" tagId = "actionForm_busName" maxlength="10"/></td>


</tr>

<tr>
<td align="center" class="label"> <i18n:getMessage messageName="Address" /> <span style="color:Red" class="captionInRed">*</span></td>
<td><netui:textBox dataSource="pageFlow.address" tagId = "actionForm_addCity1" maxlength = "20"/></td>

</tr>




</netui:form>


</netui:body>
</netui:html>


here is my english properties file

MessageBundle.properties*
Name=Name
Address=Address

here is my Hindi properties file

Messagein_IN.properties*_

Name=ਨਾਮੇ
Address=ਅੱਡ੍ਰੇੱਸ

here is my JAva file

PropertiesConstant.java_

package PunjabiConverter;

public class PropertiesConstant {

     public static String RESOURCE_BUNDLE_FILENAME="MessagesBundle";

     public static String getRESOURCE_BUNDLE_FILENAME() {
          return RESOURCE_BUNDLE_FILENAME;
     }

     public static void setRESOURCE_BUNDLE_FILENAME(String resource_bundle_filename) {
          RESOURCE_BUNDLE_FILENAME = resource_bundle_filename;
     }
}


Please suggest me what should i do as am getting the unicode whenever am clicking on the HINDI BUTTON. please help me in this please please.

Edited by: 909278 on Jan 20, 2012 3:22 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points