Problems displaying unicode encodeded characters in components

I'm having problems getting Flash to display unicode that is
imported from XML. In the example below the unicode characters in
the name tag come through in Flash exactly as typed eg: \u00EA
The xml file is written by PHP.
<?xml version="1.0"?>
<!-- Generated On: Sep-11-2007 12:24:19
--><Colortool><Siding><item><type>c</type><id>11</id><name>Rev\u00EAtement
Sp\u00E9cial</name>
etc..
However I've also tried re-saving the file manually in an
editor encoded as UTF-8. Same result.
Setting up a little test like:
temp = "Rev\u00EAtement de premi\u00E8re qualit\u00E9";
trace ("temp: " + temp);
Traces: Revêtement de première qualité as
expected.
Any ideas why it works when the variable is set in Flash, but
not when it's loaded from XML?
Thanks,
Anson

By experimenting and some searching through the net I figured out that you need to set the right font. Kannada can be displayed using Tunga font on windows. But neither HTMLEditor nor TextArea has a setFont() method. Instead I tried with Text.
text.setFont(Font.font("Tunga", 25.0));
This worked partially. For example, if I try printing the character 'ಲಿ' its two component characters 'ಲ ಿ' are getting printed. They are not joining to form one single character 'ಲಿ'. Kannada like other Indic scripts is a complex layout script and I figured out from this post that complex layouts are not yet supported.
Re: Urdu language support in Javafx UI Controls
Unfortunately I cant use javafx for my purpose :-((

Similar Messages

  • Create HTML file that can display unicode (japanese) characters

    Hi,
    Product:           Java Web Application
    Operating system:     Windows NT/2000 server, Linux, FreeBSD
    Web Server:          IIS, Apache etc
    Application server:     Tomcat 3.2.4, JRun, WebLogic etc
    Database server:     MySQL 3.23.49, MS-SQL, Oracle etc
    Java Architecture:     JSP (presentation) + Java Bean (Business logic)
    Language:          English, Japanese, chinese, italian, arabic etc
    Through our java application we need to create HTML files that have to display unicode text. Our present works well with English and most of the european character set. But when we tried to create HTML files that will display unidoce text, say japanese, only ???? is getting displayed. Following is the code we have used. The out on the browser displays the japanese characters correctly. But the created file displays only ??? in place of japanese chars. Can anybody tell how can we do it?
    <%
    String s = request.getParameter( "txt1" );
    out.println("Orignial Text " + s);
    //for html output
    String f_str_content="";
    f_str_content = f_str_content +"<HTML><HEAD>";
    f_str_content = f_str_content +"<META content=\"text/html; charset=utf-8\" http-equiv=Content-Type></HEAD>";
    f_str_content = f_str_content +"<BODY> ";
    f_str_content = f_str_content +s;
    f_str_content = f_str_content +"</BODY></HTML>";
    f_str_content = new String(f_str_content.getBytes("8859_9"),"Shift_JIS");
    out.println("file = " + f_str_content);
              byte f_arr_c_buffer1[] = new byte[f_str_content.length()];
    f_str_content.getBytes(0,f_str_content.length(),f_arr_c_buffer1,0);
              f_arr_c_buffer1 = f_str_content.getBytes();
    FileOutputStream l_obj_fout; //file object
    //file object for html file
    File l_obj_f5 = new File("jap127.html");
    if(l_obj_f5.exists()) //for dir check
    l_obj_f5.delete();
    l_obj_f5.createNewFile();
    l_obj_fout = new FileOutputStream(l_obj_f5); //file output stream for writing
    for(int i = 0;i<f_arr_c_buffer1.length;i++ ) //for writing
    l_obj_fout.write(f_arr_c_buffer1);
    l_obj_fout.close();
    %>
    thanx.

    Try changing the charset attribute within the META tag from 'utf-8' to 'SHIFT_JIS' or 'utf-16'. One of those two ought to do the trick for you.
    Hope that helps,
    Martin Hughes

  • Problem displaying Unicode text.

    Hi guys,
    I am new to I18N. i want to display some unicode text using java program. But i always get "???"..any idea??
    public class I18N {
    public static void main(String[] args) throws Exception {
    String street = "\u65E5\u672C\u8A9E";
    System.out.println(street);
    if i use unicode value equivalent to english chars, it works fine..i know there is some problem in loading the corresponding fonts..but not able to nail the problem.psl help..examples appreciated.

    For example if you have a MS-OS check this site
    http://www.hclrss.demon.co.uk/unicode/fonts.html
    or you could simple try every font you can find on your system.

  • Problems displaying some special characters on gray 80gb classic

    Hello,
    I recently got a new gray 80gb iPod classic and I have noticed that certain characters cannot be displayed on it. This occurs with characters such as 'ø' (which is actually the full name of an obscure minimal techno act from the early 1990s) and 'ÿ' (which would occur in the name of the metal band Queensrÿche in the case of my iPod). What is unusual is that these characters DO show up fine when I'm browsing through artists/albums, etc However when I actually play a song whose title or artist names contains such characters, they do not show up on the screen (next to the album art, title/artist/album interface).
    Has anybody else noticed this and, if so, found any way to rememdy it?
    Thanks in advance,
    J

    If your xml is utf-8 then I don't think you need the html
    encoding with the ampersand.
    The following works fine for me in windows:
    var cdata="<b>Main Title Copy Goes Here
    ™</b>"
    var tf:TextField=
    this.createTextField("myTF",1,100,100,300,200);
    tf.html=true;
    tf.htmlText=cdata;
    That was with the default settings and no embedded fonts etc.

  • Problems displaying french special characters

    Hello,
    we are developing a multi-lingual WebDynpro application. The languages are set correct and the translation for all parts (portal, xls-files) works fine. Except the correct displaying of WebDynproResourceBundle-files.
    Example:
    We use the french property file with the content:
    Enl\u00c3\u00a8vement
    When calling this value, it displays:
    Enlèvement
    instead of
    Enlèvement
    I already tried to set the jvm system parameter for encoding to latin1 and latin2. But this didn't help.
    Does anybody know, what parameter I have to set to have this french special signs displayed the right way?
    Thank you in advance.
    Matthias

    Yes, I use UTF-8. I think this is the default-value, isn't it?
    They are displayed wrongly, when executing the WebDynpro application. Inside the NWDS editor the display is like that:
    example:
    editor:               language:  browser:     correct
    gel\u00f6
    scht de gelö
    scht ok
    Enl\u00c3\u00a8
    vement fr Enlè
    vement no!
    As you can see, it works fine for german special characters, but not for french, czech and some other languages.
    Thank you

  • Displaying Unicode (Kannada) characters in HTMLEditor/ TextArea

    Dear All,
    I am newbie to JavaFX and also to java desktop ui applications. Was trying to create a simple text editor in Kannada but was unable to display the Kannada text in the editor. However, I gave the stage a Kannada title and that was displayed. Is there anything special I need to do (like setting encoding or something) to have the editor display Kannada fonts? Please help. Here is the code that I have written:
    Group root = new Group();
    Scene scene = new Scene(root, 800, 600, Color.WHITE);
    primaryStage.setScene(scene);
    primaryStage.setTitle("ಅಚ್ಚು ಕಲಿ"); // This text is displayed in the title of the window
    HTMLEditor editor = new HTMLEditor();
    editor.setHtmlText("ಇಲ್ಲಿ ಬರೆಯಿರಿ"); // This text shows up as boxes
    root.getChildren().add(editor);
    primaryStage.show();
    Please help!
    Thanks,
    Sandeep.

    By experimenting and some searching through the net I figured out that you need to set the right font. Kannada can be displayed using Tunga font on windows. But neither HTMLEditor nor TextArea has a setFont() method. Instead I tried with Text.
    text.setFont(Font.font("Tunga", 25.0));
    This worked partially. For example, if I try printing the character 'ಲಿ' its two component characters 'ಲ ಿ' are getting printed. They are not joining to form one single character 'ಲಿ'. Kannada like other Indic scripts is a complex layout script and I figured out from this post that complex layouts are not yet supported.
    Re: Urdu language support in Javafx UI Controls
    Unfortunately I cant use javafx for my purpose :-((

  • Problem Displaying Unicode at the console

    Hello,
    What do I need to do to print out a unicode charecter which is of some other language for example ( telugu,an indian language).
    I had found out that the unicode range for telugu is 0C00 to 0C7F.
    I had tried doing char c = '\u0C10';
              System.out.println(c);
    But I could only see that a '?' symbol is being printed to the console.
    Could some one suggest an alternate or what is wrong with what I'm doing?
    Thanks in advance.

    I can install my local language font, but would it be
    helping things out?I told you, I have Japanese installed, and it didn't help me. Joni offered you a suggestion or two. Did you try them?
    because I think the unicode chraecter set relies on
    local OS! But I'm not sure.I don't know how much it depends on the OS, but it definitely depends on the capabilities of the program running. MS Word supports unicode, but that doesn't mean all Windows programs do.
    Why does'nt Windows XP Support Unicode at command
    prompt?Because cmd.exe is a very old program and probably the folks at M$ figured the way it's used it doesn't need to support unicode.
    Why do you need unicode in your command prompt?

  • Displaying unicode or HTML escaped characters from HTTPService in Flex components.

    Here is a solution on the Flex Cookbook I developed for
    displaying data in Flex components when the data comes back from
    HTTPService as unicode of HTML escaped data:
    Displaying
    unicode or HTML escaped characters from HTTPService in Flex
    components.

    Hi again Greg,
    I have just been adapting your idea for encountering
    occasional escaped characters within a body of "normal" text, eg
    something like
    hell&ocirc; sun&scaron;ine
    Now, the handy String.fromCharCode(charCode) call works a
    dream if instead of the above I have
    hell&#244; sun&#353;ine
    Do you know if there is an equivalent call that takes the
    named entities rather than the numeric ones? Clearly I can just do
    some text substitution to get the mapping, but this means rather
    more by-hand work than I had hoped. However, this is definitely a
    step in a useful direction for me.
    Thanks,
    Richard
    PS hoping that the web page won't simply outguess me and
    replace all the above! Basically, the first line uses named
    entities and the second the equivalent numbers...

  • Displaying unicode characters

    Dear all,
    I am currently dealing with a character displaying problem on the MAM.
    We will soon go live in China. Until now we only had European countries, with a Latin alphabet.
    Now however this changes, so we need to use Unicode to display all characters correctly.
    Therefor I have converted all our custom language files to language files with Unicode escape characters.
    e.g.:
    EQUIPMENTS_EQU_MAT_NR=设备材料号码
    Now the strange thing is that when we login in Chinese, everything is displayed correctly, but when we login in German or Polish (countries which also have some special characters), we don't see everything displayed correctly.
    This is the code how we display an entry from the language file on the screen:
    <%@page language="java" contentType="text/html; charset=UTF-8"%>
    meta http-equiv="Content-Type" content="text-html; charset=UTF-8"
    <jsp:useBean id="res" class="com.sap.ip.me.api.services.MEResourceBundle" scope="session"></jsp:useBean>
    <%=PageUtil.ConvertISO8859toUTF8(res.getString("CONFIRMATIONS_HEADER_DETAIL"))%>
    For Chinese language, the characters are displayed correctly in this way.
    e.g.: 最后一次同步时间
    However Polish characters and German characters are not (always) displayed correctly.
    e.g.: Wskaźnik pierwszego usuniÄu2122cia usterki
    The only 'difference' that I can see is that for China, every character in the language file has a special Unicode notation, while for Polish and German characters, only the special characters are displayed in special Unicode notation.
    e.g.:
      EQUIPMENTS_EQU_MAT_NR=Numer materia\u00c5‚u sprz\u00c4™tu
    FYI, I've converted the files to Unicode escape characters with the java util native2ascii.exe.
    Is there anyone who knows how to solve this issue?
    Thanks already in advance!
    Best regards,
    Diederik
    Edited by: Diederik Van Wassenhove on Jul 6, 2009 2:34 PM

    Dear all,
    I've found the reason for this problem.
    Thanks anyway for your time!
    The problem was that when converting the language files to Unicode escape characters, the source format was wrong. The files where saved as UTF-8, but the JAVA tool native2ascii is not taking UTF-8 as standard input format. So the resulting Unicode file was not containing the correct Unicode characters.
    I've re-generated the language files with the parameter -encoding UTF-8, and now everything is displayed correctly!
    Have a good day!
    Diederik

  • How to display UNICODE characters in a Widget control

    Hi,
    I am working on a widget. Some of the contents (descriptions) are Chinese.
    How to display these Chinese characters in a Widget control. I am currently using Table as the control for this.
    Thanks in advance.
    Regards,
    Ram.

    You don't need to use CIDFonts and CMaps for Cyrillic (though you can). The crucial thing to realise is that displaying Latin1 (that is, English and related text) leaves you in a very simple corner of PDF. Doing anything with other encodings instantly makes a project more complex, perhaps 10 times more complex. Far eastern fonts perhaps 10 times more complex again.
    The principle is the same for all of them. To use any character you need
    1. A font containing that character. PDF has built in fonts containing Latin1, such as Helvetica, but there is no such luxury for other encodings.
    2. The right (license) to embed the font.
    3. The technical ability to embed the font. In many case this isn't just a case of embedding a file as a stream, but also you need to analyse the tables in the font, and sometimes trim or modify them.
    4. An encoding for the font.
    5. Text streams which use character positions in the encoding to show the text.
    Basically you need to read and read and reread the chapter on text, and its references (such as font formats). This will become your constant friend or tormenter for the many months of the project.
    If you don't like the sound of that, or it doesn't make ecomomic sense to do that, there are many PDF libraries which have taken the necessary months or years to do this.

  • Unicode font for swing components

    Hi all,
    I'd like to set a Swing component (a JLabel) to a particular font so it will properly display Unicode Greek text. I've been reading all about physical vs. logical fonts, and I've read through the various Sun docs/faqs on Internationalization, Fonts, and Unicode, but I just can't get this to work. I think I'm missing something more basic here about selecting my font. My test word is the Greek "khairete," with an accent over the iota. Here is the Unicode:
    \u03c7\u03b1\u1f77\u03c1\u03b5\u03c4\u03b5
    The trick is that accented iota.
    I can launch an xterm that shows the characters I want like this:
    $ xterm -fn -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 &
    That tells me that if I can get Java to use that font, then I'm all set. I'm trying the following test program:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    public class GUI extends JFrame {
    public static final String MESSAGE = "\u03c7\u03b1\u1f77\u03c1\u03b5\u03c4\u03b5";
    public GUI() throws Exception {
    super();
    Font[] fonts;
    Container container;
    JLabel label;
    fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
    for (int j=0;j<fonts.length;j++) {
    System.out.println(fonts[j]);
    container = getContentPane();
    container.setLayout(new GridLayout(0, 1));
    // try with the default font
    label = new JLabel(MESSAGE);
    container.add(label);
    printFont(label.getFont());
    // see what the default font looks like when PLAIN (to compare with fonts below)
    label = new JLabel(MESSAGE);
    label.setFont(label.getFont().deriveFont(Font.PLAIN, 12));
    container.add(label);
    printFont(label.getFont());
    // this looks the same as the default font, meaning we didn't find what we asked for.
    label = new JLabel(MESSAGE);
    label.setFont(new Font("-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1", Font.PLAIN, 12));
    container.add(label);
    printFont(label.getFont());
    // this also falls back to the default.
    label = new JLabel(MESSAGE);
    label.setFont(Font.getFont("-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1"));
    container.add(label);
    printFont(label.getFont());
    // this (of course) falls back to the default.
    label = new JLabel(MESSAGE);
    label.setFont(Font.getFont("not a font name"));
    container.add(label);
    printFont(label.getFont());
    // try every font we've got!
    for (int j = 0; j < fonts.length; j++) {
    label = new JLabel(fonts[j] + ": " + MESSAGE);
    label.setFont(fonts[j].deriveFont(Font.PLAIN, 12));
    container.add(label);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    pack();
    show();
    public static void printFont(Font f) {
    System.out.println(f);
    if (f != null) {
    public static void main(String[] args) throws Exception {
    GUI me = new GUI();
    But nothing in this code succeedings in printing \u1f77. As I've said, the plain old xterm can do it. I think my problem is that I haven't successfully referenced the desired font in the Java code. But how do I do this? These are the fonts available to me, according to the code above:
    java.awt.Font[family=Bitstream Charter,name=Bitstream Charter,style=plain,size=1]
    java.awt.Font[family=Bitstream Charter,name=Bitstream Charter Bold,style=plain,size=1]
    java.awt.Font[family=Bitstream Charter,name=Bitstream Charter Bold Italic,style=plain,size=1]
    java.awt.Font[family=Bitstream Charter,name=Bitstream Charter Italic,style=plain,size=1]
    java.awt.Font[family=Courier,name=Courier,style=plain,size=1]
    java.awt.Font[family=Courier 10 Pitch,name=Courier 10 Pitch,style=plain,size=1]
    java.awt.Font[family=Courier 10 Pitch,name=Courier 10 Pitch Bold,style=plain,size=1]
    java.awt.Font[family=Courier 10 Pitch,name=Courier 10 Pitch Bold Italic,style=plain,size=1]
    java.awt.Font[family=Courier 10 Pitch,name=Courier 10 Pitch Italic,style=plain,size=1]
    java.awt.Font[family=Courier,name=Courier Bold,style=plain,size=1]
    java.awt.Font[family=Courier,name=Courier Bold Italic,style=plain,size=1]
    java.awt.Font[family=Courier,name=Courier Italic,style=plain,size=1]
    java.awt.Font[family=Cursor,name=Cursor,style=plain,size=1]
    java.awt.Font[family=Lucida Bright,name=Lucida Bright Demibold,style=plain,size=1]
    java.awt.Font[family=Lucida Bright,name=Lucida Bright Demibold Italic,style=plain,size=1]
    java.awt.Font[family=Lucida Bright,name=Lucida Bright Italic,style=plain,size=1]
    java.awt.Font[family=Lucida Bright,name=Lucida Bright Regular,style=plain,size=1]
    java.awt.Font[family=Lucida Sans,name=Lucida Sans Demibold,style=plain,size=1]
    java.awt.Font[family=Lucida Sans,name=Lucida Sans Demibold Oblique,style=plain,size=1]
    java.awt.Font[family=Lucida Sans,name=Lucida Sans Oblique,style=plain,size=1]
    java.awt.Font[family=Lucida Sans,name=Lucida Sans Regular,style=plain,size=1]
    java.awt.Font[family=Lucida Sans Typewriter,name=Lucida Sans Typewriter Bold,style=plain,size=1]
    java.awt.Font[family=Lucida Sans Typewriter,name=Lucida Sans Typewriter Bold Oblique,style=plain,size=1]
    java.awt.Font[family=Lucida Sans Typewriter,name=Lucida Sans Typewriter Oblique,style=plain,size=1]
    java.awt.Font[family=Lucida Sans Typewriter,name=Lucida Sans Typewriter Regular,style=plain,size=1]
    java.awt.Font[family=Luxi Mono,name=Luxi Mono Bold,style=plain,size=1]
    java.awt.Font[family=Luxi Mono,name=Luxi Mono Bold Oblique,style=plain,size=1]
    java.awt.Font[family=Luxi Mono,name=Luxi Mono Oblique,style=plain,size=1]
    java.awt.Font[family=Luxi Mono,name=Luxi Mono Regular,style=plain,size=1]
    java.awt.Font[family=Luxi Sans,name=Luxi Sans Bold,style=plain,size=1]
    java.awt.Font[family=Luxi Sans,name=Luxi Sans Bold Oblique,style=plain,size=1]
    java.awt.Font[family=Luxi Sans,name=Luxi Sans Oblique,style=plain,size=1]
    java.awt.Font[family=Luxi Sans,name=Luxi Sans Regular,style=plain,size=1]
    java.awt.Font[family=Luxi Serif,name=Luxi Serif Bold,style=plain,size=1]
    java.awt.Font[family=Luxi Serif,name=Luxi Serif Bold Oblique,style=plain,size=1]
    java.awt.Font[family=Luxi Serif,name=Luxi Serif Oblique,style=plain,size=1]
    java.awt.Font[family=Luxi Serif,name=Luxi Serif Regular,style=plain,size=1]
    java.awt.Font[family=Utopia,name=Utopia Bold,style=plain,size=1]
    java.awt.Font[family=Utopia,name=Utopia Bold Italic,style=plain,size=1]
    java.awt.Font[family=Utopia,name=Utopia Italic,style=plain,size=1]
    java.awt.Font[family=Utopia,name=Utopia Regular,style=plain,size=1]
    java.awt.Font[family=dialog,name=dialog,style=plain,size=1]
    java.awt.Font[family=dialog,name=dialog.bold,style=plain,size=1]
    java.awt.Font[family=dialog,name=dialog.bolditalic,style=plain,size=1]
    java.awt.Font[family=dialog,name=dialog.italic,style=plain,size=1]
    java.awt.Font[family=dialoginput,name=dialoginput,style=plain,size=1]
    java.awt.Font[family=dialoginput,name=dialoginput.bold,style=plain,size=1]
    java.awt.Font[family=dialoginput,name=dialoginput.bolditalic,style=plain,size=1]
    java.awt.Font[family=dialoginput,name=dialoginput.italic,style=plain,size=1]
    java.awt.Font[family=monospaced,name=monospaced,style=plain,size=1]
    java.awt.Font[family=monospaced,name=monospaced.bold,style=plain,size=1]
    java.awt.Font[family=monospaced,name=monospaced.bolditalic,style=plain,size=1]
    java.awt.Font[family=monospaced,name=monospaced.italic,style=plain,size=1]
    java.awt.Font[family=sansserif,name=sansserif,style=plain,size=1]
    java.awt.Font[family=sansserif,name=sansserif.bold,style=plain,size=1]
    java.awt.Font[family=sansserif,name=sansserif.bolditalic,style=plain,size=1]
    java.awt.Font[family=sansserif,name=sansserif.italic,style=plain,size=1]
    java.awt.Font[family=serif,name=serif,style=plain,size=1]
    java.awt.Font[family=serif,name=serif.bold,style=plain,size=1]
    java.awt.Font[family=serif,name=serif.bolditalic,style=plain,size=1]
    java.awt.Font[family=serif,name=serif.italic,style=plain,size=1]
    javax.swing.plaf.FontUIResource[family=Dialog,name=Dialog,style=bold,size=12]
    java.awt.Font[family=Dialog,name=Dialog,style=plain,size=12]
    java.awt.Font[family=dialog,name=-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1,style=plain,size=12]
    javax.swing.plaf.FontUIResource[family=Dialog,name=Dialog,style=plain,size=12]
    javax.swing.plaf.FontUIResource[family=Dialog,name=Dialog,style=plain,size=12]
    Apparently, I need to use the correct "name" to specify the font. So my next try was this:
    $ xlsfonts -ll -fn -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
    name: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
    direction: left to right
    indexing: matrix
    rows: 0x00 thru 0x30 (0 thru 48)
    columns: 0x00 thru 0xff (0 thru 255)
    all chars exist: no
    default char: 0x0000 (0)
    ascent: 14
    descent: 4
    font type: Character Cell
    bounds: width left right asc desc attr keysym
    min 9 0 0 -3 -13 0x0000
    max 9 8 9 14 4 0x0000
    properties: 23
    FONTNAME_REGISTRY
    FOUNDRY Misc
    FAMILY_NAME Fixed
    WEIGHT_NAME Medium
    SLANT R
    SETWIDTH_NAME Normal
    ADD_STYLE_NAME
    PIXEL_SIZE 18
    POINT_SIZE 120
    RESOLUTION_X 100
    RESOLUTION_Y 100
    SPACING C
    AVERAGE_WIDTH 90
    CHARSET_REGISTRY ISO10646
    CHARSET_ENCODING 1
    COPYRIGHT Public domain font. Share and enjoy.
    XMBDFEDINFO 654
    CAP_HEIGHT 10
    X_HEIGHT 7
    FONT -Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1
    WEIGHT 10
    RESOLUTION 138
    QUAD_WIDTH 9
    name: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
    direction: left to right
    indexing: matrix
    rows: 0x00 thru 0x30 (0 thru 48)
    columns: 0x00 thru 0xff (0 thru 255)
    all chars exist: no
    default char: 0x0000 (0)
    ascent: 14
    descent: 4
    font type: Character Cell
    bounds: width left right asc desc attr keysym
    min 9 0 0 -3 -13 0x0000
    max 9 8 9 14 4 0x0000
    properties: 23
    FONTNAME_REGISTRY
    FOUNDRY Misc
    FAMILY_NAME Fixed
    WEIGHT_NAME Medium
    SLANT R
    SETWIDTH_NAME Normal
    ADD_STYLE_NAME
    PIXEL_SIZE 18
    POINT_SIZE 120
    RESOLUTION_X 100
    RESOLUTION_Y 100
    SPACING C
    AVERAGE_WIDTH 90
    CHARSET_REGISTRY ISO10646
    CHARSET_ENCODING 1
    COPYRIGHT Public domain font. Share and enjoy.
    XMBDFEDINFO 654
    CAP_HEIGHT 10
    X_HEIGHT 7
    FONT -Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1
    WEIGHT 10
    RESOLUTION 138
    QUAD_WIDTH 9
    (Yes, xlsfonts prints two entries.)
    Here is a bit more data:
    [pjungwir@mccurdy unicode_gui]$ uname -a
    Linux mccurdy.nfic.com 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
    [pjungwir@mccurdy unicode_gui]$ cat /etc/redhat-release
    Red Hat Linux release 8.0 (Psyche)
    [pjungwir@mccurdy unicode_gui]$ java -version
    java version "1.4.2_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
    Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
    If anyone has any suggestions, I would really appreciate it. I'd like to find an answer that doesn't involve editing the font.properties file.
    Thanks,
    --Paul

    Hi Sojan,
    first up, forget the notion of even tinkering with the font.properties file if you can. It's an old, outdated method of setting up the fonts that Sun doesn't even support any more. Use setFont() where you can, and die trying in the process! ;-)
    One thing I would check is which font each AWT component currently thinks it has. It's easy enough to set the font system wide with Swing components, but I'm not sure if that capability extends to AWT components (I've certainly had trouble with it in various places in the past). While you've set up the Chinese font correctly, your AWT components might still be stuck with the Java default (Helvetica, or whatever it is, which is incapable of displaying Chinese), and hence displaying the rectangles because they don't know how to handle the foreign characters. You might need to set SimSun as the font for each of your AWT components individually at a worst-case scenario.
    Hope that helps,
    Martin Hughes

  • Displaying Unicode in Sweden

    Hi,
    I'm trying to get a JTextPane to display Unicode (e.g. Chinese) characters. I'm situated in Sweden so my cup of Java (or something) doesn't seem too happy about it ;).
    More specifically, I want to paste a, say, Chinese character into a JTextPane and have it displayed as one and not as a square. Then I want to send it to another JTextPane and have it displayed there.
    I've looked at the String and the character is properly encoded there. I've tried to exchange the font.properties file with font.properties.zh_TW but to no good. I've also tried to edit the font.properties file, using the Arial Unicode MS font (which is pre installed on my Windows 2000 OS) and the SYMBOL_CHARSET (instead of simple Arial and ANSI_CHARSET), but that haven't helped me either.
    Thanks for any help you can offer,
    Pelle

    The remedy may depend on whether the problem is specific to JTextPane or to any other TextComponent's. Does the method setText(String) work?

  • Regarding displaying unicode

    Hello javaGurus!
    <Please Help me regarding displaying unicode>
    I am new to javaInternationalization,
    Till now i studies. Java Internationalization tutorial at http://java.sun.com/docs/books/tutorial/i18n/index.html and understand basic Structure.
    I have some problem displaying the unicode characters, such at, Arabic, and japneese.
    - How to display unicodes in applet?
    - How can we set the the Japneese, English, Arabic fonts in one application, which run on windows environment.
    - From where i can get the font s?
    Regards,
    waseem

    If you specify a String object with the unicode sequences (of the form "\u####\u####"), you can simply display it with the method setText(String) of the class javax.text.JTextComponent (or javax.JTextArea), for example. If you specify a String object with your own encoding in your source code, you can compile it with the command:
    javac -encoding <encodingName> fileName
    On Windows OS, the font ArialUnicodeMS will display almost all characters you are to show.
    You can find downloadable fonts in almost any search engine.
    - The following can be additional material for studying.
    http://java.sun.com/j2se/1.4/docs/guide/intl/fontprop.html
    http://developer.java.sun.com/developer/qow/archive/65/index.html

  • Unicode (international) characters in cfpdfform with LiveCycle PDFs

    Hi all
    These are the details of my environment:
    ColdFusion version: 8.0.1
    Update level: C:/ColdFusion8/lib/updates/chf8010004.jar
    Server OS: Windows Vista 64
    Web server: Apache
    I'm using cfpdfform in ColdFusion 8 to read a Livecycle 8.2.1 pdf form straight into the browser window, enter text into a couple of fields and then submit the form back to the same CF page and use the submitted XML to populate the same form.
    So, the relevant bit of my code is as follows:
    <cfif IsDefined("PDF")>
        <cfpdfform action="read" source="#PDF.content#" xmldata="myXMLData" />
        <cfset myXMLData = XMLParse(myXMLData)>
        <cfpdfform action="populate" source="c:\temp\myPDFForm.pdf" xmldata="#myXMLData#" overwritedata="true" />
    <cfelse>
        <cfpdfform action="populate" source="c:\temp\myPDFForm.pdf">
            <cfpdfsubform name="topmostSubform">
                <cfpdfformparam name="TextField1" value="Hello! The time is #TimeFormat(Now(), 'HH:mm:ss')#" />
            </cfpdfsubform>
        </cfpdfform>       
    </cfif>
    This all works just fine, except that any multibyte unicode characters (e.g. Chinese) I enter into any text fields are lost (turned to question marks) when the form is populated from the submitted XML, even though I can see that the Unicode characters remain intact if I do a cfdump of the myXMLData variable on page submission.
    I ordinarily have no problems with Unicode. I can write unicode characters in multiple foreign character sets to database and retrieve them just fine. I have site pages in several international character sets, and, as I have stated, the text I enter is displayed correctly in the correct foreign characters when I view a cfdump of the submitted form, so this appears to be specifically related to the PDF form populate side of things (or a setting in LiveCycle).
    I have an inkling that the cause is that the LiveCycle form has its  text fields set to allow rich text and has a specific font set against  the fields, so I'm wondering whether the foreign character font, which  displays fine when I enter it into the form, is being lost (overwritten by the LiveCycle field font) when read  back into the form. Any ideas as to how to overcome this problem would  be gratefully accepted.

    Okay, I think I got to the bottom of this. The following full page code works:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>cfpdfform Post and Populate Example</title>
    </head>
    <body>
    <cfoutput>
    <cfif IsDefined("PDF")>
        <cfpdfform action="read" source="#PDF.content#" xmldata="myXMLData" result="data" />
        <cfpdfform action="populate" source="c:\temp\myLiveCycleForm.pdf" xmldata="#myXMLData#" />
    <cfelse>
        <cfpdfform action="populate" source="c:\temp\myLiveCycleForm.pdf" />
    </cfif>
    </cfoutput>
    </body>
    </html>
    The key to stopping the Chinese characters from breaking was to remove the overwritedata attribute from the populate tag on the action page. In other words, changing
    <cfpdfform action="populate" source="c:\temp\myLiveCycleForm.pdf" xmldata=""#myXMLData#" overwriteData="yes" />
    to
    <cfpdfform action="populate" source="c:\temp\myLiveCycleForm.pdf" xmldata="#myXMLData#" />
    fixed the problem.
    As an interim measure, I wrote out the submitted PDF form XML to a file and took a look at what was happening and used the XML file as the basis for populating the PDF form, like this:
    <cfif IsDefined("PDF")>
         <cfpdfform action="read" source="#PDF.content#" xmldata="myXMLData" result="data" />
        <cffile action="write" file="c:\temp\myXMLData.xml" output="#myXMLData#" charset="utf-8" nameconflict="overwrite">
        <cfpdfform action="populate" source="c:\temp\myLiveCycleForm.pdf" xmldata="c:\temp\myXMLData.xml" />
    <cfelse>
         <cfpdfform action="populate" source="c:\temp\myLiveCycleForm.pdf" />
    </cfif>
    As well as causing the Chinese characters to break, the overwritedata attribute when populating the form appears to strip out any rich text  formatting (CSS) from form fields.
    Dropping the overwritedata attribute preserved the Chinese characters, regardless of whether the PDF form is populated directly from the posted PDF XML (as in the full example above) or via an XML file.
    On a separate issue (one I'll post to the LiveCycle forum but I'm mentioning here for other people's reference), any XML which contains in-line CSS formatiing (e.g. individual words in bold text) using the span tag causes a ColdFusion error when used to populate the PDF form.

  • Problem displaying japanese character set in shopping cart smartform

    Hi All,
    whenever users are entering some text in Japanese character set while creating a shopping cart in SRM, the smartform print output is displaying some junk characters!! even though the system is unicode compatable, did any one have problem ??
    Thanks.

    Hi,
    May be there is some problem with UNICODE conversion.
    See the foll links;
    Note 548016 - Conversion to Unicode
    http://help.sap.com/saphelp_srm50/helpdata/en/9f/fdd13fa69a4921e10000000a1550b0/frameset.htm
    Europe Languages  work  in  Non- Unicode  System
    Re: Multiple Backends
    Re: Language issue
    Standard Code Pages in Non-Unicode System
    Re: Upgrade from EBP 4.0 to SRM 5.0
    http://help.sap.com/saphelp_srm50/helpdata/en/e9/c4cc9b03a422428603643ad3e8a5aa/content.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/11/395542785de64885c4e84023d93d93/content.htm
    BR,
    Disha.
    Do reward points for  useful answers.

Maybe you are looking for