Problem in displaying dynamic japanese data in JSP
Hi all,
I am trying to display japanese data (address) fetched from RDBMS database but only ???????? getting displayed. First the data is fetched from database then populated in xml. From xml databean is created .
Steps taken
I have put chartset =shift-jis in jsp response header .
I made sure the encoding for XML file is UTF-8 for parsing. I am using documentbuilder object for parsing for xml.
I am not sure what needs to be done to display japnese text properly.
I appreciate if i get solution as i am struck with this for long time
Regards,
prasad
Your JSP pages need to contain a JSP directive that specifices the encoding for the pages (one that supports Japanese).
I use:
<%@ page contentType="text/html;charset=UTF-8" %>
You could also use:
<%@ page contentType="text/html;charset=SHIFT-JIS" %>
When you view with your browser also remember to set the page encdoing and ensure your OS has the proper fonts installed.
Similar Messages
-
Problem in displaying dynamiic japanese data
I am trying to display japanese data (address) fetched from RDBMS database but only ???????? getting displayed.
First the data is fetched from database then populated in xml. XML is in UTF-8 encoding,From xml ,databean is created .
Steps taken
I have put chartset =shift-jis in jsp response header .
I made sure the encoding for XML file is UTF-8.
I am not sure what needs to be done to display japnese text properly.
cheers
svpTien ,
I tired this but it did not work.
I was curious knowing how japanese static text is put into jsp code. I want to know whether i followed right way because if the change te encoding to utf-8 ,my jsp displays question marks even for static content. -
Problem in working with Japanese data
Hello,
We have an application, which should work for both English and Japanese languages. Our application is working fine for English data but in case of Japanese, we are facing problems. In the application, there is a language setting, where the user can select either English or Japanese. This changes the language of the labels to English or Japanese. We are handling this thru' ResourceBundles. But the data that is entered can be independent of this. In English setting also, the data entered or diplayed could be Japanese. Now we are facing problems at vaious places -
1. When we enter Japanese data and save it, it gets copied into the bean and if there is any error in the saving, the same data from bean comes back on the screen. This data doesn't appear properly in Japanese.
2. When we try to retrieve the already saved data from database, it doesn't show poperly in Japanese.
We are using our own 'toUnicode' function, which converts the data to Unicode before saving the data to database. Similarly, we have tried different encodings like SJIS / Shift_JIS / ISO-2022-JP at various places i.e. in 'Page' directive or in HTML Meta tag or various combinations of these two. Nothing is working reliably. Sometimes for some combination, data retained in the first case is correct but it can't be saved. Sometimes it works with Unicode, sometimes without Unicode. Some combination affects the Japanese labels as well. Otherwise the labels at least are displayed properly.
The same code with just Shift_JIS setting in 'page' directive, worked well in IIS Server for both English and Japanese.
What could be the problem in WebLogic? Does it matter if WL is installed on English or Japanese machine?
Kindly answer ASAP, since the project is getting delayed.
Thanking in anticipation...
-MedhaHi,
is there a difference in handling Japanese and Chinese chars? If not I
might be able to give you some hints.
Daniel
-----Original Message-----
From: JSB [mailto:[email protected]]
Posted At: Monday, February 12, 2001 6:22 PM
Posted To: internationalization
Conversation: Problem in working with Japanese data
Subject: Re: Problem in working with Japanese data
Have u solved this yet, and how ?
Medha <[email protected]> wrote in message
news:[email protected]...
>
Hello,
We have an application, which should work for both English andJapanese
languages. Our application is working fine for English data but in case
of
Japanese, we are facing problems. In the application, there is a
language
setting, where the user can select either English or Japanese. This
changes
the language of the labels to English or Japanese. We are handling this
thru' ResourceBundles. But the data that is entered can be independent
of
this. In English setting also, the data entered or diplayed could be
Japanese. Now we are facing problems at vaious places -
1. When we enter Japanese data and save it, it gets copied into thebean
and if there is any error in the saving, the same data from bean comes
back
on the screen. This data doesn't appear properly in Japanese.
2. When we try to retrieve the already saved data from database, itdoesn't show poperly in Japanese.
We are using our own 'toUnicode' function, which converts the datato
Unicode before saving the data to database. Similarly, we have tried
different encodings like SJIS / Shift_JIS / ISO-2022-JP at various
places
i.e. in 'Page' directive or in HTML Meta tag or various combinations of
these two. Nothing is working reliably. Sometimes for some combination,
data
retained in the first case is correct but it can't be saved. Sometimes
it
works with Unicode, sometimes without Unicode. Some combination affects
the
Japanese labels as well. Otherwise the labels at least are displayed
properly.
The same code with just Shift_JIS setting in 'page' directive,worked
well in IIS Server for both English and Japanese.
What could be the problem in WebLogic? Does it matter if WL isinstalled on English or Japanese machine?
Kindly answer ASAP, since the project is getting delayed.
Thanking in anticipation...
-Medha -
Smartform Problem in Displaying a string data
Hi Friends,
I am facing a problem while displaying a string data in smartform. Actually it is a one of the field's data in an internal table. It is a STRING field type of length 0. While populating in an internal table it is having a all the data(Around 700 char data). But while displaying in a smartform surprizingly only few characters(Around 225 char data). How can i overcome this problem?
Regards,
Sekhar.JHi
try this and see
Declare some Variables of 72 char each and split that long string data of internal table text field into them and display these variables strings one below other in smartform
var1 = itab-text+0(72)
var2 = itab-text+72(72)
var3 = itab-text+144(72)
like that
and display one below other in smartform.
&VAR1&
&VAR2&
&VAR3&
Reward points for useful Answers
Regards
Anji -
How to display rows of data in JSP?
Hi,
I am learning Servlet and JSP. There is an exercise which requires us to access a database from a Servlet and display the retrieved data in a JSP.
Now I am ok with the database connection. So how to display the data using some kind of loop?
RegardsThey're called ResultSets and they are returned when you execute a query from a Statement. The next() method will tell you whether or not you have another row of data to read.
-
Problems with displaying dynamic Arabic text
We have a problem with a navigation system we are building
which has to be able to display dynamic Arabic text. We are pulling
in the Arabic text using XML. The problem we are having is that the
character are not displaying joined up where they should be (for
instance in the middle of words). Arabic characters have different
shaping according to the position they take up within a word. What
we are producing is apparently unreadable. Has anyone come accross
this problem before? Is it solveable?Hi:
Is there any possible chance that Adobe would do something to asist us Fl8 users with international character support.
Everyone has some work-around, except Abode, and they are all usually related to XML.
My setup is PHP (CMS supporting many languages) -> MySQL -> PHP -> Flash8 (Dynamic Text Fields) and the olpart that does not work is when I inject an extended character into the string - Flash stops displaying anything from that character on.
If Adobe has or did have some component / solution or anything other than the usual System.useCodePage = true (which never seems to actually work), please let me know.
Best Regards, -
Problem in displaying dynamic values in dropdown list for each row
I want to display dynamic values in a drop down list for each row, and these values depends on the column value in each row(ptaid), based on each ptaid i need to fetch values for drop down list. so how can i achieve this..
Thanks
BabuBabu,
This has been discussed in many old threads, try to find them. Also u can refer to article "Dependent Dynamic message choicelists ", at my blog
http://www.mukx.blogspot.com/
--Mukul -
Out.println() problems with large amount of data in jsp page
I have this kind of code in my jsp page:
out.clearBuffer();
out.println(myText); // size of myText is about 300 kbThe problem is that I manage to print the whole text only sometimes. Very often happens such that the receiving page gets only the first 40 kb and then the printing stops.
I have made such tests that I split the myText to smaller parts and out.print() them one by one:
Vector texts = splitTextToSmallerParts(myText);
for(int i = 0; i < texts.size(); i++) {
out.print(text.get(i));
out.flush();
}This produces the same kind of result. Sometimes all parts are printed but mostly only the first parts.
I have tried to increase the buffer size but neither that makes the printing reliable. Also I have tried with autoFlush="false" so that I flush before the buffer size gets overflowed; again same result, sometimes works sometimes don't.
Originally I use such a system where Visual Basic in Excel calls a jsp page. However, I don't think that this matters since the same problems occur if I use a browser.
If anyone knows something about problems with large jsp pages, I would appreciate that.Well, there are many ways you could do this, but it depends on what you are looking for.
For instance, generating an Excel Spreadsheet could be quite easy:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class TableTest extends HttpServlet{
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
response.setContentType("application/xls");
PrintWriter out = new PrintWriter(response.getOutputStream());
out.println("Col1\tCol2\tCol3\tCol4");
out.println("1\t2\t3\t4");
out.println("3\t1\t5\t7");
out.println("2\t9\t3\t3");
out.flush();
out.close();
}Just try this simple code, it works just fine... I used the same approach to generate a report of 30000 rows and 40 cols (more or less 5MB), so it should do the job for you.
Regards -
Problem in displaying dynamic table placed in master page
Hi all,
I have placed a dynamic table in my master page. When the page overflows the dynamic table is shown only in 1st page. I want this table to be shown in every page. Please help me solve this.
Regards,
Devaiahhi,
Thank you all for your reply. But i cannot keep the table in body page as i want this table to be displayed in every page in the header. Actually i am displaying an address through this table.
I have moved the content area in master page to center and reduced its size and in the body page i have placed a table which will display the report. When this table overflows to next page all the contents in master page are shown except for the address table in master page. I am not sure whether i am doing it the right way as i am bit new to adobe forms.
Please let me know where am i going wrong. Also please suggest me some alternative method ( if any ) to display the address in every page if the above method is not feasible.
Regards,
Devaiah -
Urgent : Problem in displaying 0fiscper as dynamic data col.
Hi SEM gurus,
I have a problem in displaying 0FISCPER in data columns. Say, in my planning level I have restricted 0FISCPER to 0001.2005 to 012.2005. and I did selected in data column, Dynamic for 0fiscper.
Now when I run my lay out for keyfig. 0Amount the lay out is like this
Customer Amount Amount Amount
Xxxxxx 10 20 30
Its not displaying the month what I want in the lay out should be like this
001.2004 002.2004 003.2004
Customer Amount Amount Amount Amount
Xxxxxx 10 20 30 40 .........
Can any one Please help me out to fix this ???
Thanks a bunch in advance
Rohith.
Message was edited by: rohith gentle
Message was edited by: rohith gentleRohith,
change HEADING column in the 2nd screen of the layout design to "0FISCPER Amount".
I think, current HEADING is named as only "Amount".
This will give layout as
Customer 001.2004Amount 002.2004Amount 003.2004Amount
hope that helps.
Hari Immadi
http://immadi.com
SEM BW Analyst -
Wrong Display of Japanese Currency in ALV Report
Dear Friends,
I am facing a problem in Displaying a Japanese Currency in the ALV Report Output. I am mentioning the Currency Key field and the Currency field in the Report.
For example, the amount field should be displaying as 22838 instead of 228.38 where this is correct in case of USD but not correct in case of JPY.
Code where the i am appending the fieldcatlog:
ls_fieldcat-fieldname = 'WAERK'.
ls_fieldcat-datatype = 'CUKY'.
ls_fieldcat-outputlen = 8.
ls_fieldcat-seltext_l = Text-088.
ls_fieldcat-seltext_m = Text-088.
ls_fieldcat-seltext_s = Text-088.
ls_fieldcat-reptext_ddic = Text-088.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'BUCK0'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 16.
ls_fieldcat-seltext_l = Text-017.
ls_fieldcat-seltext_m = Text-017.
ls_fieldcat-seltext_s = Text-017.
ls_fieldcat-reptext_ddic = Text-017.
Please do suggest if any inputs on the same.
Thanks in Advance for you reply.
Thanks and Regards,
Saritha KHi,
All the Decimals related to currency fields will be stored in the table tcurx.
You have to get the currency and respective decimals into internal table.
Read the internal the table with key equal to currency.
And calculate the values as below :
loop at gt_output.
READ TABLE gt_tcurx WITH KEY currkey = gt_output-zwaers.
IF sy-subrc EQ 0.
IF gt_tcurx-currdec = '0'.
gt_output-dmbtr = gt_output-dmbtr * 100.
ELSEIF gt_tcurx-currdec = '3'.
gt_output-dmbtr = gt_output-dmbtr / 10.
ENDIF.
ENDIF.
MODIFY gt_output.
endloop. Then pass the gt_output to ALV FM.
In the above code gt_output is my final internal table which i am passing to the ALV FM. And gt_tcurx is the internal table consists of all the currency and their decimals.
Thanks,
Sri. -
Problem in displaying extension data at item level in JSP!!!
Hi Experts,
I am facing a problem when i try to display extension data in JSP. This is how i have coded in CRM system and in JSP:
After searching an order in the webshop let say order no 1, and i ll select this order no .1. Now the BADI CRM_ISA_BASKET_ITEMS is triggered and in the method getitems_getdata, i have written a code with hard coded values like this:
method IF_EX_CRM_ISA_BASKET_ITEMS~GETITEMS_GET_DATA..
data:wa_extension like line of ct_extension.
wa_extension-ref_guid = '498AB6EC7B623152E1000000AC1383C5'.(ref guid is item guid of the order 1)
wa_extension-name = 'Z_CustomItemExtData'.
wa_extension-value = 'he is a good boy'(hardcoded value) .
append wa_extension to ct_extension.
endmethod.
And in JSP i have written code like this to display:
<%-- code for extension data --%>
<tr>
<td class="identifier">Ext data</td>
<td class="value" ><%= JspUtil.encodeHtml(orderitem.getExtensionData("Z_CustomItemExtData")) %></td>
</tr>
But i am not getting the value in the JSP which i have hard coded in the BADI method. Is there any thing wrong in the above code? Please help me in this as i am very much new to ABAP.
Thanks a lot in Advance!!
Regards,
lakshman.hi,
did you hardcode the ref-guid too? This could be the problem.
Regards
Michael -
Problem Displaying out Data in JSP
can anyone have a look at my code? i got some problems to display it in jsp when i run it with eclipse. can anyone help me on this?? did my java bean declared wrongly? thanks...
this is my java file
package com;
import java.io.File;
import com.db4o.Db4o;
import com.db4o.ObjectContainer;
import com.db4o.ObjectSet;
import org.jfree.chart.*;
import org.jfree.data.general.*;
public class StoreData{
private static final long serialVersionUID = 1L;
private final static String filename = "C:\\CountryPieChart.yap";
public static void main(String[] args){
//Delete the existing file
new File(filename).delete();
ObjectContainer db=Db4o.openFile(filename);
try {
StoreAllData();
retrieveAllData();
} finally{
db.close(); //Close the database
public static void StoreAllData() {
//Delete the existing file
new File(filename).delete();
ObjectContainer db = Db4o.openFile(filename);
//Add data to the database
CountryPeople countryName_1 = new CountryPeople("Malaysia", 100);
CountryPeople countryName_2 = new CountryPeople("New Z", 200);
CountryPeople countryName_3 = new CountryPeople("UK", 300);
CountryPeople countryName_4 = new CountryPeople("Thailand", 400);
CountryPeople countryName_5 = new CountryPeople("Singapore", 50);
//set the value to database
db.set(countryName_1);
db.set(countryName_2);
db.set(countryName_3);
db.set(countryName_4);
db.set(countryName_5);
public static void retrieveAllData() {
//Open db
ObjectContainer db = Db4o.openFile(filename);
//Retrieve via empty object
CountryPeople cName = new CountryPeople(null, 0);
ObjectSet result = db.get(cName);
DefaultPieDataset dataset = new DefaultPieDataset();
//retrieve the data from database
while(result.hasNext()) {
CountryPeople obj = (CountryPeople) result.next();
dataset.setValue(obj.getName(), obj.getValue());
//System.out.println(result.next());
//Create pie chart
JFreeChart chart = ChartFactory.createPieChart(
"Sample Chart",
dataset,
true,
true,
false);
try {
//save the pie chart as JPEG file
ChartUtilities.saveChartAsJPEG(new File("C:\\CountryPieChart.jpg"), chart, 500, 300);
} catch(Exception e) {
System.out.println("Problem for creating chart");
and this is my jsp file
<jsp:useBean id="myStoreData" class="com.StoreData" scope="page"></jsp:useBean>
<html>
<head><title>Testing Displaying</title>
</head>
<body>
<b>Testing Display Page</b>
<img src="<jsp:getProperty name="myStoreData" property="getFileName" /> /">
</body>
</html><img src="<jsp:getProperty name="myStoreData" property="getFileName" /> /">
property="getFileName": There isnt such a property available in your bean. -
Japanese charcters displaying as "?" on a JSP page
Hi
My database is UTF-8. I am loading some japaneese data using sql*loader and using Java.IO mechanism(Reader classes). Both ways it is storing the data on database in proper(Japanese) format. If I print it on dos-prompt then same Japanese characters are printing, no problem till here. But if I try to print the same data in database on a JSP page then it is printing "?"(question marks). Also, if I insert any data from a JSP page then it is inserting it as "?" on database. Any help, I really appreciate that.
Thanks
RamI am using Chinese Windows NT 4.0
I succeed in displaying Big5 chinese using Unicode encoding in JSP.
Now I encounter problem in displaying HK fonts.
Nevertheless,
Have your tried to set the charset in your jsp file ?
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
Or have tried to set the browser encoding method to your desired one shift-jfs
<% response.setContentType("text/html; charset=UTF8");%>
Lastly, have you tried including a parameter in your getBytes stream
String temp = rs.getString("headline");
String newResult = new String(temp.getBytes("UTF-8"),"UTF-8");
Hope this is related! -
JSP and servlets(displaying Data On JSP page)
Hiii all
i am new to JSP ...also to servets
tell me hw to print my data on the JSP page,
i can print my data on the server,that data i want to print on JSP page
if u all have e.g's it will be very good
Thanks in advance
Take Care
Rahul :)What do you mean "print data on a JSP?" If you simply mean display dynamic content, you should def read up both on sun's resources and other googled resources for JSP walkthroughs...
Maybe you are looking for
-
How to import external jar file
i am using bcprov-jdk14-124.jar file for my project. i can import this jar file through eclipse project properties but this is not worklng when i create jar file for my project. This is worked in eclipse only. i want to use that jar file in my projec
-
have an iphod touch in recovery mode and hooked into the computer to restore it, because the kids forgot password and locked it up.now say software server cannot be contacted what do i do now?
-
Hi guys I run Pr CC on a Win7 64bit machine and reloaded all my CC programs recently. Previously my dynamic link was set to Audition but now it set itself to AE. I cannot seem to find a way to change it back to Audition in the preferences, which is m
-
Sort the data set after quering
Hi I have a grid where I query and load the data. Is it possible to filter and show the same data set which I have got in the grid with a check box item. Some occasions needs to get input for the said filter from the first row of the grid. (Dev Forms
-
Hi All. In my console appeared message "console: Could not find image 'BackArrow' ". Does somebody know what it means ??? BR