Chinese can't display correctly
Hi,
i am encountering a strange problem.
I am trying to run a jsp on OC4J 10.1.3.3 StandAlone and struts-1.3.9
I'm setting up Chinese in ApplicationResources_zh.properties.But when I use in test.jsp. Web page display is to acquiesce in language "Western Europe (ISO)",I must right strikes choosing "simplified Chinese".
And then I add <meta http-equiv="Content-Type" content="text/html; charset=GBK"> to the page. Web page display change to acquiesce in language " simplified Chinese ".But the Chinese display has become the messy code.
Test.jsp
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<head>
<html:base/>
<title><bean:message key="index.title"/></title>
</head>
<body bgcolor="white">
Hello World
</body>
</html:html>
Any help on sorting this out is welcome.
Regards
Hi gavin
Check this threads
/message/3043884#3043884 [original link is broken]
chinese font display in chart grachic error
BEx display Chinese Incorrect
Chinese Chracter doesn't display
Regards
William Neira
Similar Messages
-
Date can not display correctly in excel from .jsp
Hi,
I create a .jsp report to export the data to excel. the report run OK, except the date field can not display correctly.
for example in database :start date ='01-oct-2003'
in the except it displays to 02/06/02.
It seem all the date field can not be control in the report, and control by somthing else
Doese anyone come accross this problem?
ThanksHi Rong,
Are you using the following demonstration to build your JSP?
http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
(Output to Excel with Oracle9i Report)
I tried to do the same, and inserted a database date field in the JSP using Reports. I found the following:
While making the template inside Excel, if I make sure that the format of the date cells is "Date" - some particular date format, the date field values from Reports does not get exported correctly.
However, if you make sure that inside the template, the format of the date cells is not date, but "General", then the date field values are correctly exported to Excel.
Pl try it and let us know.
Navneet. -
Chinese Bookmarks not displayed correctly even if fonts are embedded in PDF
We currently have a problem with Chinese PDFs containing bookmarks. All content is displayed correctly in PDF Reader, but the bookmarks are shown as squares, even though correct font (Sim Sun) is embedded in the PDF.
Display results of bookmarks are different from pc to pc. Seems to be depending on the installed system fonts. But why does the PDF Reader does not use the embedded fonts for the bookmarks?
BR
BerndBookmarks don't use embedded fonts - you will see that they do not vary with the PDF. Like the rest of the text around the PDF (window titles, dialog captions, buttons...) it uses system fonts. So you need system support for the Chinese (simplified or traditional) used in the PDF. I suspect this won't be a problem for most of the people who could read the Chinese, at least.
-
Chinese characters not displaying correctly
the software's windows fonts can't display
why?
archlinux + fvwm +chromium !
Last edited by jasonwryan (2012-05-21 07:57:53)Please read the Forum Etiquette before continuing to post: especially the section on How To Post
https://wiki.archlinux.org/index.php/Fo … ow_to_Post
Also, there are many free image hosts: choose on that works if you want help with your issue. -
Chinese characeter set can not be displayed correctly
I'm using Portal 3.0.9.8.0,but Chinese character set on Label and Button can not be displayed correctly.
what is the reason? How to resolve the problem?
Thinks
Frankhi,
I finished the installation of language and chose Chinese in "Set Language" Portlet.The Portal becomes Chinese version.
I use "Form based on table or view" method to created a form in Chinese and the process was favoring.The Chinese characters are displayed correctly.But when I edit any item(such as button text or label text) of this form all Chinese characters are displayed as unorderly code.What is the reason?May I get your help again?
thinks,
Frank -
Can Not Display Normal Chinese Chars in JSP
Hi,
I am displaying some chinese chars in a normal JSP file but it show me some
funny things. If I get the data from the oracle and the information is chinese,
then it display correctly. And I try another thing that I save the noraml JSP
(without any java code) to a html and it is working fine. Same content, if saved
as HTML, then ok. If saved as JSP, then got problem. I am using weblogic 6.1.
There are somewhere need to be configure or... Any idea for this? Thank you
very much!
yang linHi Howard,
if i use Font.createFont() to general font object that
can solve chinese display problem in RH 7.3. but i
thought, it's no reasonable way to use font object.
that is really bad for cross-platform benefit or you
need to carry font file with your application.
have a way to set default font use createFont()
object?In the past, I've carried the font file around with me. Given the number of graphics files, properties files and
other assorted garbage that apps are already carrying around, it's not too unreasonable to have to add a
TrueType font to the list of hangers-on (unless it's the size of Arial Unicode MS - 23Mb is a big ask sometimes)!
Given that TrueType fonts themselves are essentially platform-independent, I don't see it as too much of an issue. But that's just me and my experiences! ;-)
To set the font as default...
try {
FileInputStream fis = new FileInputStream("myFont.ttf");
Font defaultFont = Font.createFont(Font.TRUETYPE_FONT, fis);
setFont(defaultFont);
} catch (FontFormatException ffe) {
System.err.println("My TrueType font is corrupted.");
} catch (IOException ioe) {
System.err.println("My I/O stuffed up.");
}There are various ways to set the font in even better ways, particularly if you're in a standalone app, but the above is at least a good basic one.
Hope that helps,
Martin Hughes -
Not all chinese characters display correctly with non-embedded text
Hi all,
I've updated to the last beta 2 of Flash Player 10.1 (10,1,51,66) and compiled this simple Flex application to illustrate the fact that not all chinese characters can be displayed correctly with non-embedded text (device font).
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024" minHeight="768"
creationComplete="resourceManager.localeChain = ['zh_CN'];"
layout="{new VerticalLayout()}">
<fx:Script>
<![CDATA[
import spark.layouts.VerticalLayout;
]]>
</fx:Script>
<s:Label text="伜-伞伟传伡伢伣伤伥伦伧伨伩伪伫伬伭-伝">
</s:Label>
<mx:Label text="伜-伞伟传伡伢伣伤伥伦伧伨伩伪伫伬伭-伝"/>
</s:Application>
Notice that characters from the Unicode range 0x4F1E .. 0x4А2D are not displayed within <s:Label> component that uses Flash Text Engine (FTE) by default to display the text, but at the same time those characters display just fine within older <mx:Label> component that relies on flash.text.TextField instance to render the text.OK, did not know that "Arial Unicode MS" font is only distributed with Microsoft Office, was looking into relying on this font in case if "simsun.ttc" font is not available at the user's system, by using the following:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="1024" minHeight="768"
creationComplete="resourceManager.localeChain = ['zh_CN']"
layout="{new VerticalLayout()}">
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/halo";
s|Label {
fontFamily: "Arial Unicode MS, SimSun, Arial";
</fx:Style>
<fx:Script>
<![CDATA[
import spark.layouts.VerticalLayout;
]]>
</fx:Script>
<s:Label id="sparkLabel" text="伜-伞伟传伡伢伣伤伥伦伧伨伩伪伫伬伭-伝"/>
</s:Application>
Tough decision ahead, but accordingly to the survey at codestyle.org (2000 participants from 2007 year and onwards), Arial Unicode MS is present at 62.53%% system surveyed.
ps
My current install of Windows XP already includes the install of Microsoft Office 2007 and I've also enabled/disabled the support of East Asian languages, thus the content of my "fonts" folder differs now significantly from "clean" Windows XP install version.
Nevertheless I found the page with comprehensive lists of standard fonts installed with different releases of Windows that looks viable here: http://www.kayskreations.net/fonts/fonttb.html -
Search results cannot be displayed correctly
I have a topic which references some code. The code can be
displayed correctly when the topic is opened from the TOC, however,
when I use some keyword to search for that topic and open it from
the Search list, the code in the topic cannot be displayed
correctly. Has anyone ever encountered such problem?Thanks for your help Peter. If I just double click the file
in Windows Explorer, it displays well. The code referenced in the
file can be shown correctly.
I tried the same guide generated using RoboHelp5, everything
is OK (I'm using RoboHelp 7.0 now). The code in that topic displays
correctly either when the topic is opened from TOC or from the
search list. However, this topic (file) hasn't been changed any
more ever since it was created, so I think something might be wrong
with RoboHelp 7's search functionality. Our QA guess the code may
be complied when RoboHelp performing the searching. -
Chinese character code can't be displayed correctly
My os is windows , and english is not good , sorry about that , I hope you can understand me ,
the default charset is gbk , But my webapp charset is utf-8 , so , some words can not be displayed correctly ,
How can I fix it , Thank you .Check if you have something like this in your .jspx :
<?xml version='1.0' encoding='UTF-8'?>
<jsp:directive.page contentType="text/html;charset=UTF-8"/> -
Pdf file in simply Chinese can not be displayed properly sometimes, how to solve it?
pdf file in simply Chinese can not be displayed properly sometimes, how to solve it?
Try a different pdf reader, like GoodReader.
Try switching your OS to Chinese (or English, if it is already in Chinese).
Verify that the pdf does display correctly on a full computer. -
Chinese name cannot be displayed correctly in IM
hi all,
We use IM as short message tool.But one problem is : We can type Chinense,and it's displayed correctly,but if one user with chinese user name send something message.some disorder words are displayed. What's the problem?
Our ep is 7.0 sp 8
thank you~!
br
delmaThanks for your help Peter. If I just double click the file
in Windows Explorer, it displays well. The code referenced in the
file can be shown correctly.
I tried the same guide generated using RoboHelp5, everything
is OK (I'm using RoboHelp 7.0 now). The code in that topic displays
correctly either when the topic is opened from TOC or from the
search list. However, this topic (file) hasn't been changed any
more ever since it was created, so I think something might be wrong
with RoboHelp 7's search functionality. Our QA guess the code may
be complied when RoboHelp performing the searching. -
Strange scenario,Oracle can not display the data in mysql correctly
I use Heterogeneous Service+ODBC to achieve "oracle access mysql"(any other method?),and now i find Oracle can not display the data in mysql correctly:
-------mysql------------
mysql> create table tst(id int,name varchar(10));
Query OK, 0 rows affected (0.00 sec)
mysql> insert into tst values(1,'a');
Query OK, 1 row affected (0.00 sec)
mysql> select * from tst;
------------+
| id | name |
------------+
| 1 | a |
------------+
1 row in set (0.00 sec)
mysql> show create table tst\G
*************************** 1. row ***************************
Table: tst
Create Table: CREATE TABLE `tst` (
`id` int(11) DEFAULT NULL,
`name` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
-------------oracle ------------------
SQL> select count(*) from "tst"@mysql;
COUNT(*)
49
SQL> select * from "tst"@mysql;
id
1
SQL> desc "tst"@mysql;
Name Null? Type
id NUMBER(10)You can make the following query on the result page:
"select * from the_table where movietitle = ? and cinema = ?"
then you set movietitle and cinema to those which the user selected. If the resultset contains more than 0 rows, that means the movie is available.
Below is the sample code, it assumes you have a connection to the database:
PreparedStatement stat = myConnection.prepareStatement("select * from the_table where movietitle = ? and cinema = ?");
stat.setString(1, usersMovieTitleSelection);
stat.setString(2, usersCinemaSelection);
ResultSet res = stat.executeQuery();
if (res.next()) {
out.print("The movie is available");
} else {
out.print("The movie is not available");
}Now just add that to your JSP page. Enjoy ! =) -
Outlook can not display htmldb mail message correctly
We are using some applications which constructed by HTML DB. All mail messages from HTML DB applications can not be displayed correctly in Outlook, but they are displayed very well in Netscape mail client. This issue happens in both HTML DB 1.5 and 1.6. Therefore, I am not sure this is HTML DB mail package issue or outlook issue. Have anyone experienced this issue. Any suggestions are highly appreciated. Thanks in advance!
Here is a sample in our application.
We see the mail message in Outlook:
This message generated by the HTML DB Mail Package. -----=1T02D27M75MU981T02D27M75MU98
Content-Type: text/plain; charset=utf-8
<BR><FONT color=#0000ff>E-Leave System Notification for SGT China.<FONT
size=2>(Note: it is NOT an official leave system)</FONT></FONT> <HR align=left width="70%" noShade><TABLE width="80%"><TBODY><TR><TD width="20%"><FONT color=#336699>Leave User :</font></TD><TD width="50%">[email protected]</TD></TR><TR><TD><FONT
color=#336699>Formal:</font></TD><TD>No</TD></TR><TR><TD><FONT
color=#336699>Type :</font></TD><TD>Personal<BR></TD></TR><TR><TD><FONT
color=#336699>Begin Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 11:30</font></TD></TR><TR><TD><FONT color=#336699>End Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 13:30</font></TD></TR><TR><TD><FONT color=#336699>Urgent Contact :</font></TD><TD>13811512211<BR></TD></TR><TR><TD><FONT
color=#336699>Note :</font></TD><TD>Go to CCB Haidian Branch for my debit cards again :(<BR></TD></TR></TBODY></TABLE><P><A
href="http://sgt.us.oracle.com/pls/htmldb/f?p=132:101">E-Leave
System</A><BR></P
-----=1T02D27M75MU981T02D27M75MU98
Content-Type: text/html;
<BR><FONT color=#0000ff>E-Leave System Notification for SGT China.<FONT
size=2>(Note: it is NOT an official leave system)</FONT></FONT> <HR align=left width="70%" noShade><TABLE width="80%"><TBODY><TR><TD width="20%"><FONT color=#336699>Leave User :</font></TD><TD width="50%">[email protected]</TD></TR><TR><TD><FONT
color=#336699>Formal:</font></TD><TD>No</TD></TR><TR><TD><FONT
color=#336699>Type :</font></TD><TD>Personal<BR></TD></TR><TR><TD><FONT
color=#336699>Begin Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 11:30</font></TD></TR><TR><TD><FONT color=#336699>End Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 13:30</font></TD></TR><TR><TD><FONT color=#336699>Urgent Contact :</font></TD><TD>13811512211<BR></TD></TR><TR><TD><FONT
color=#336699>Note :</font></TD><TD>Go to CCB Haidian Branch for my debit cards again :(<BR></TD></TR></TBODY></TABLE><P><A
href="http://sgt.us.oracle.com/pls/htmldb/f?p=132:101">E-Leave
System</A><BR></P>
-----=1T02D27M75MU981T02D27M75MU98--
-----=1T02D27M75MU981T02D27M75MU98--
And this is my code:
declare
l_body_html varchar2(4000);
l_subject varchar2(100);
begin
l_subject := 'eLeave Notification from ' || lower(:app_user) || '@oracle.com'; l_body_html := '<BR><FONT color=#0000ff>E-Leave System Notification for SGT China.<FONT size=2>(Note: it is NOT an official leave system)</FONT></FONT> ' || '<HR align=left width="70%" noShade>' || '<TABLE width="80%"><TBODY><TR>' || '<TD width="20%"><FONT color=#336699>Leave User :</font></TD><TD width="50%">' || lower(:app_user) || '@oracle.com' || '</TD></TR><TR><TD><FONT color=#336699>Formal:</font></TD><TD>' || :P3_FORMAL || '</TD></TR><TR><TD><FONT color=#336699>Type :</font></TD><TD>' || :P3_LEAVE_TYPE || '<BR></TD></TR><TR><TD><FONT color=#336699>Begin Time :</font></TD><TD>'
|| '<FONT color=#ff0000>' || :P3_BEGIN_TIME || '</font>' ||
'</TD></TR><TR><TD><FONT color=#336699>End Time :</font></TD><TD>' || '<FONT color=#ff0000>' || :P3_END_TIME || '</font>' || '</TD></TR><TR><TD><FONT color=#336699>Urgent Contact :</font></TD><TD>'
|| :P3_CONTACT ||
'<BR></TD></TR><TR><TD><FONT color=#336699>Note :</font></TD><TD>' || :P3_NOTE || '<BR></TD></TR></TBODY></TABLE><P><A
href="http://sgt.us.oracle.com/pls/htmldb/f?p=132:101">E-Leave
System</A><BR></P>';
HTMLDB_MAIL.SEND(
P_TO => :P3_MAIL_TO,
P_FROM => '[email protected]',
P_CC => :P3_MAIL_CC,
P_BCC => :P3_MAIL_BCC,
P_BODY => l_body_html,
P_BODY_HTML => l_body_html,
P_SUBJ => l_subject);
end;
---------------------------------------------------------------------------------------------------------------This was not well documented, but we have improved the doc for the next relase. Essentially, you need a carriage return / line feed every 1000 characters. This is part of the SMTP spec. The package does not do this automatically for you, so try adding them yourself. You can use utl_tcp.crlf for the crlf.
Tyler -
How can I display JTextFields correctly on a JPanel using GridBagLayout?
I had some inputfields on a JPanel using the boxLayout. All was ok. Then I decided to change the panellayout to GridBagLayout. The JLabel fields are displayed correctly but the JTextField aren't. They are at the JPanel but have a size of 0??? So we cannot see what we type in these fields... Even when I put some text in the field before putting it on the panel.
How can I display JTextFields correctly on a JPanel using GridBagLayout?
here is a shortcut of my code:
private Dimension sFieldSize10 = new Dimension(80, 20);
// Create and instantiate Selection Fields
private JLabel lSearchAbrText = new JLabel();
private JTextField searchAbrText = new JTextField();
// Set properties for SelectionFields
lSearchAbrNumber.setText("ABR Number (0-9999999):");
searchAbrNumber.setText("");
searchAbrNumber.createToolTip();
searchAbrNumber.setToolTipText("enter the AbrNumber.");
searchAbrNumber.setPreferredSize(sFieldSize10);
searchAbrNumber.setMaximumSize(sFieldSize10);
public void createViewSubsetPanel() {
pSubset = new JPanel();
// Set layout
pSubset.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
// Add Fields
gbc.gridy = 0;
gbc.gridx = GridBagConstraints.RELATIVE;
pSubset.add(lSearchAbrNumber, gbc);
// also tried inserting this statement
// searchAbrNumber.setText("0000000");
// without success
pSubset.add(searchAbrNumber,gbc);
pSubset.add(lSearchAbrText, gbc);
pSubset.add(searchAbrText, gbc);
gbc.gridy = 1;
pSubset.add(lSearchClassCode, gbc);
pSubset.add(searchClassCode, gbc);
pSubset.add(butSearch, gbc);
}import java.awt.*;
import java.awt.event.*;
import javax .swing.*;
public class GridBagDemo {
public static void main(String[] args) {
JLabel
labelOne = new JLabel("Label One"),
labelTwo = new JLabel("Label Two"),
labelThree = new JLabel("Label Three"),
labelFour = new JLabel("Label Four");
JLabel[] labels = {
labelOne, labelTwo, labelThree, labelFour
JTextField
tfOne = new JTextField(),
tfTwo = new JTextField(),
tfThree = new JTextField(),
tfFour = new JTextField();
JTextField[] fields = {
tfOne, tfTwo, tfThree, tfFour
Dimension
labelSize = new Dimension(125,20),
fieldSize = new Dimension(150,20);
for(int i = 0; i < labels.length; i++) {
labels.setPreferredSize(labelSize);
labels[i].setHorizontalAlignment(JLabel.RIGHT);
fields[i].setPreferredSize(fieldSize);
GridBagLayout gridbag = new GridBagLayout();
JPanel panel = new JPanel(gridbag);
GridBagConstraints gbc = new GridBagConstraints();
gbc.weightx = 1.0;
gbc.weighty = 1.0;
gbc.insets = new Insets(5,5,5,5);
panel.add(labelOne, gbc);
panel.add(tfOne, gbc);
gbc.gridwidth = gbc.RELATIVE;
panel.add(labelTwo, gbc);
gbc.gridwidth = gbc.REMAINDER;
panel.add(tfTwo, gbc);
gbc.gridwidth = 1;
panel.add(labelThree, gbc);
panel.add(tfThree, gbc);
gbc.gridwidth = gbc.RELATIVE;
panel.add(labelFour, gbc);
gbc.gridwidth = gbc.REMAINDER;
panel.add(tfFour, gbc);
final JButton
smallerButton = new JButton("smaller"),
biggerButton = new JButton("wider");
final JFrame f = new JFrame();
ActionListener l = new ActionListener() {
final int DELTA_X = 25;
int oldWidth, newWidth;
public void actionPerformed(ActionEvent e) {
JButton button = (JButton)e.getSource();
oldWidth = f.getSize().width;
if(button == smallerButton)
newWidth = oldWidth - DELTA_X;
if(button == biggerButton)
newWidth = oldWidth + DELTA_X;
f.setSize(new Dimension(newWidth, f.getSize().height));
f.validate();
smallerButton.addActionListener(l);
biggerButton.addActionListener(l);
JPanel southPanel = new JPanel(gridbag);
gbc.gridwidth = gbc.RELATIVE;
southPanel.add(smallerButton, gbc);
gbc.gridwidth = gbc.REMAINDER;
southPanel.add(biggerButton, gbc);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(panel);
f.getContentPane().add(southPanel, "South");
f.pack();
f.setLocation(200,200);
f.setVisible(true); -
How can i display digits in Chinese Format
Hi,
How can i display the digits in Chinese Format?
Suppose i have a number 15 as a value.
Now in Locale Chinese(Taiwan) it should display the digit as a combination of Chinese character for 10 + 5.
So could anyone please tell me what should i do for it?
Thanks,
Pinakin AriwalaI think my question is not much clear so let me give you some more detail
There is a special characters available for a digits like 10,20 ,30 ,100 etc so when we want to represent the number 15 it should be displayed as a combination of chinese character for 10 and chinese character for 5.
similarly if we want to display 115 then it should 100+10+5 ..
so please anyone suggest me the way ito go?
Pinakin Ariwala
Maybe you are looking for
-
Can anyone help me with this problem?
Okay, here's the deal. My girlfriend's Toshiba laptop fell off her nightstand, and took a 2.5 foot fall to her hard wooden floor. It landed on the right side, which as you all probably know has both the hard drive and DVD drive. Setting aside the fac
-
Custom Template for Third Party Balance Summary Report(Java type executable
Hi Al,l we have a requirment to have a layout with some of the fields from Third Party Balance Summary Report( Which is a Java type executable and Data definition has Data Template attached(.xml)). I tried in below way. Coppied the Third Party Balanc
-
I can't sync one specific song to my ipad.
Really strange, because I can add it to play lists and play in on my PC, and on my iTouch, but can't send it to my iPad. Any ideas?
-
Can I use magic mouse with iPad 2?
Is there a way to use the magic mouse with the iPad 2? Doing so would improve my Citrix experience greatly. Thanks
-
To run WP8.1 or WP10 emulators - mainly WP8.1 emulators - what tools to install
To run WP8.1 or WP10 emulators - mainly WP8.1 emulators - what tools to install ? I installed Win 10 Preview... in VMWare Player 7. To run WP8.1 or WP10 emulators - mainly WP8.1 emulators - what tools to install ? MS - VS community 2013 ? or...?