• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JEditorPane problem displaying non-English text in 1.4 (Linux)

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai
I am trying to display a non English text in JEdiorPane . This is working fine with 13 but not with 1.4. (In 1.4 the non-English text is being rendered in english font).
I am giving the HTML file and the java code that displays the html file below
somebody pl help

HTML file:
<HTML>
<HEAD>
<STYLE>
font.English0 {font-family:Courier,TimesNewRoman,helvetica,VERDANA,sansserif; font-style:normal;font-size:14pt;}
font.telugu1 { font-family: Tl_tthemalatha;font-style: normal;font-size: 12pt; }
font.English1 { font-family: Courier;font-style: normal;font-size: 22pt; }
</STYLE>

</HEAD>
<BODY>

<font class=telugu1> the non english text </font>
</BODY>
</HTML>
the java code is.............
class outpane extends JFrame
{
JEditorPane jep;
Syllable sl;
public static void main(String[] args)
{
new outpane(args[0]);
}
outpane(String str)
{

jep = new JEditorPane();
jep.setEditable(false);
jep.setContentType("text/html");
JScrollPane js = new JScrollPane(jep);
this.getContentPane().add(js);
setSize(400,500);
setVisible(true);
setText(str);

}
void setText(String str)
{

try{
BufferedReader br1;
FileInputStream fr1;

fr1=new FileInputStream(str);
br1=new BufferedReader(new InputStreamReader(fr1,"ISO8859-1"));
String s = new String();
String s1 = new String();
int j = 0;
while((s = br1.readLine()) != null)
{
s += "\n";
// Some mappings...
}
jep.setText(s1);
fr1.close();

}catch(Exception e){System.out.println("Exp");}
}
}

To menction again this works fine in 1.3. In 1.4 the font is not beibg recognised

THIS HAPPENS ONLY ON LINUX (RH8)
Thanks in Anticipation
 
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic