I have boxes instead of Farsi characters as the text of MenuItem label...

Hi
As i started programming by jdk6, i had no problem in text components neither in awt nor in swing.
But for labels or titles of AWT components, yes :
I couldn't have Farsi characters displayable on AWTs just as simple as Swing by typing them into the source code.
lets check this SSCCE :
import javax.swing.*;
import java.awt.*;
import java.io.*;
import java.util.Properties;
public class EmptyFarsiCharsOnAWT extends JFrame{
    public EmptyFarsiCharsOnAWT() {
        super("مثال");
        setDefaultCloseOperation(3);
        setVisible(rootPaneCheckingEnabled);
    public static void main(String[] args) throws AWTException, IOException {
        JFrame jFrame = new EmptyFarsiCharsOnAWT();
        MenuItem show ;
        // approach 1 = HardCoding :
        show = new MenuItem("\u0646\u0645\u0627\u06cc\u0634 \u0645\u062a\u0627");
        // approach 2 = using simple utf-8 saved text file :
            BufferedReader in = new BufferedReader(new FileReader("farsiLabels.txt"));
            String showLabel = in.readLine();
            in.close();
            show = new MenuItem(showLabel);
         // approach 3 = using properties file :
        FileReader in = new FileReader("farsiLabels.properties");
        Properties farsiLabels = new Properties();
        farsiLabels.load(in);
        show = new MenuItem(farsiLabels.getProperty("tray.show"));
        PopupMenu popUp = new PopupMenu();
        popUp.add(show);
            // creating Tray object
            Image iconIamge = Toolkit.getDefaultToolkit().getImage("greenIcon.png");
            TrayIcon trayIcon = new TrayIcon(iconIamge, null, popUp);
            SystemTray tray = SystemTray.getSystemTray();
            tray.add(trayIcon);
            jFrame.setIconImage(iconIamge);
Yes, i know each of three approaches in source code does right when you may test it from IDE , but if you make a JAR contains just this class (and its resources) by means of NetBeans > project > clean&build ,you won't see the expected characters and will just get EMPTY/BLANK SQUARES !
Unfortunately, opposed to other situations i encountered before, here there is no way to avoid using awt and make use of Swing in this case.
And this was just an SSCCE i made to show the problem and my recent (also first ) application suffers from this subject.
Unfortunately it seems i can not attach anything to my post!
the content of text file is just this one line:
نمایش متاand
The contents of Properties file is this :
#Sun May 02 09:45:10 IRDT 2010  
tray.show=نمایش متاfor instance.
the icon image i don't think will differ to the issue.
i am using latest version of Netbeans IDE.
Thank you very much in advance.

Any idea plz ?

Similar Messages

  • Square boxes instead of Japanese characters in pdf output of a crystal rep

    Hi All,
    Did anyone of you ever faced such an issue, where the pdf output of a crystal report shows square boxes instead of Japanese characters when the output is saved in pdf. However the crystal report output looks perfect. I have saved the ouput in xls and rtf formats the characters look perfect as required, the issue we have is when the output is saved as pdf.
    I have language pack installed on my machine.
    My guess is that the few Character's width is not sufficient and few Characters in other fields appear perfect in pdf. I have to test this, it might take few days before I can access this report. Before that I want to gather information. If anyone has solution to this issue please let me know.
    Thanks,
    Ravi

    Hi,
    Could you please answer the following questions
    1.What version of Crystal Reports are you using?
    Go to Help-> About to find out.
    2.What is the font you are using on the report?
    Try to change the font style to MS Gothic or Arial Unicode MS, most preferably MS Gothic.
    And export the report to PDF format.
    This may help you
    Thanks,
    Praveen G

  • Creating a PDF from a SAAS app creates boxes instead of Japanese characters

    I'm using an online app (Unleashed Software) to "print" invoices, and the printed invoices show boxes instead of Japanese characters. The really weird thing about this problem, is that it occurs only on certain devices. I've tested on Macs, Windows, Android, and iOS, and on some devices I get the problem, and on some devices I don't. It's not just a Windows problem, or a iOS problem. Additionally, I use different browsers, from Chrome, to IE, to Firefox, to Safari. Changing the browser doesn't seem to help when it's on a device that won't output Japanese characters in a PDF properly.
    I'm wondering how PDFs are generated when using online software. Since I can't reproduce the problem on certain devices, it seems to me that the software is using some local settings to render the PDF incorrectly.
    Any ideas of how I could go about troubleshooting this problem?

    Hi,
    Could you please answer the following questions
    1.What version of Crystal Reports are you using?
    Go to Help-> About to find out.
    2.What is the font you are using on the report?
    Try to change the font style to MS Gothic or Arial Unicode MS, most preferably MS Gothic.
    And export the report to PDF format.
    This may help you
    Thanks,
    Praveen G

  • I see boxes instead of Japanese or other language text

    I see boxes instead of Japanese or other language text.
    This happens on my my browsers, not just firefox. I tried downloading chrome and safari but this did not help.

    Windows XP doesn't have support for Japanese and other languages installed by default.
    # Click the Start button and choose Control Panel.
    # Click the Date, Time, Language and Regional Options icon.
    # Click the Regional and Language Options icon.
    # Click the Languages tab.
    # Under Supplemental Language Support, make sure both "Install files…" options are checked.
    You may also want to install ClearType fonts that were introduced in Windows Vista.
    * [http://www.microsoft.com/en-us/download/details.aspx?id=10550 Japanese ClearType fonts for Windows XP | Microsoft Download Center]
    * [http://www.microsoft.com/en-us/download/details.aspx?id=10490 Korean ClearType fonts for Windows XP | Microsoft Download Center]
    * [http://www.microsoft.com/en-us/download/details.aspx?id=14577 Simplified Chinese ClearType fonts for Windows XP | Microsoft Download Center]
    * [http://www.microsoft.com/en-us/download/details.aspx?id=12072 Traditional Chinese ClearType fonts for Windows XP | Microsoft Download Center]

  • After placing a new text box in my document, typing new text, clicking away, then coming back to edit the text, I am unable to get my cursor to reappear within that text box. I can only select the box itself. I cannot select the text. Where is my cursor?

    After placing a new text box in my document, typing new text, clicking away, then coming back to edit the text, I am unable to get my cursor to reappear within that text box. I can only select the box itself. I cannot select the text. Where is my cursor?

    Even simpler than that.
    Clicking once in a text box selects it.
    Clicking once in a selected text box places the insertion point in the box.
    The clicks do not need to be close enough in time to be read as a double click.
    The same behaviour applies to table cells in Pages and in Numbers.
    Regards,
    Barry

  • I am a beginner of "pages" and have this problem of dots while writing the text. I dont know how to remove these bullets-like dots while spacing in the text. Please help

    I am a beginner of "pages" and have this problem of dots while writing the text. I dont know how to remove these bullets-like dots while spacing in the text. Please help

    Look up "formatting" in the User Guide.
    http://manuals.info.apple.com/MANUALS/0/MA524/en_US/Pages_UserGuide.pdf

  • SInce the iOS 7.0.2 update I can't have any GarageBand's Ringtone working for the text's Ringtone... Please help me

    SInce the iOS 7.0.2 update I can't have any GarageBand's Ringtone working for the text's Ringtone...
    Please help me

    As the other person that replied, I have no issues with my 4S on iOS 7.0.2. What user troubleshooting have you tried? Restart, reset, restore from backup, restore as new. Try double tapping on the home button, swipe upwards to force closed the camera app, then do a reset. That is holding the sleep/wake and home buttons together until you see the Apple logo and then release. The phone will reboot. This will have not affect on your data. Try opening the camera app again and see if it works.
    One last question. You say that it shows a standard size picture of the picture where you started. Is this when you are looking at the picture you tried to take in the Camera Roll?

  • PDF file displays boxes instead of Japanese characters

    Hi,
    I am creating PDF files with a custom third-party set of sortware tools (Infragistics NetAdvantage).
    This particular PDF document contains Japanese text using the Meiryo font and this font is embedded into the PDF file. It works fine in Windows (using the Adobe Acrobat Reader application), even on a machine where Meiryo is not installed.
    But when viewed on the iPad, the text is displayed as a bunch of empty boxes.
    Also, I'm not sure if it's related, but when viewing the same document on Window XP using FoxIt (instead of the Adobe Acrobat Reader), the text is not shown at all - there's just an empty space and not even boxes.
    I would love to attach a sample PDF file here, but I don't see any way to do that... is there a way to attach files to these questions?

    So the empty boxes are indeed shown by built-in preview, and Adobe Reader is also not able to render the content and it appears as blank.
    After investigation , it turns out that system fonts on ipad does not have the required glyphs ( ~ symbol ) to render these characters. This is Apple’s bug and you may have to report this issue , indicating that it is not rendered in Preview / i-books on the ipad.
    Sorry for the inconvenience.
    Thanks,
    -vaibhav

  • I am trying to download a form to fill in and it appears in Windows wordpad and there are milions of random characters which |I have to delete before I get to the text and then the test isn't in the format of a form to fill in. Help!!!

    when ever I try to download a form to fill in, the default is windows wordpad and then it appears with millions of characters which I have to delete before getting to the text which is not in the style of a form to fill in.
    How can i get it to download the form as it is?

    What kind of code do you see?
    Is that an HTML file or a PDF file for the Adobe Reader?
    *https://support.mozilla.com/kb/Using+the+Adobe+Reader+plugin+with+Firefox

  • Since my last firefox update, I have been unable to type an email - the text box does not appear when I press 'reply' , or press 'compose'. The email provider is '123-reg.co.uk. I have been using both firefox and the provider ['webfusion Ltd/webmail123] s

    Hello. Since my last firefox update, I have been unable to type an email - the box within which one would usually type does not appear when I press 'reply' to a received email, or press 'compose'. The email provider is '123-reg.co.uk. I have been using both firefox and the provider ['webfusion Ltd/webmail123] successfully for well over a year. The provider says it is a browser problem. I can still add an attachment to the email header, which successfully can be sent, but the recipient gets my standard email 'signature' with font messages and the attachment. Can anyone help? My email addresses are [email protected] [this is the one with the issue] and [email protected] in English
    == today

    My daughter has had her Razr for about 9 months now.  About two weeks ago she picked up her phone in the morning on her way to school when she noticed two cracks, both starting at the camera lens. One goes completely to the bottom and the other goes sharply to the side. She has never dropped it and me and my husband went over it with a fine tooth comb. We looked under a magnifying glass and could no find any reason for the glass to crack. Not one ding, scratch or bang. Our daughter really takes good care of her stuff, but we still wanted to make sure before we sent it in for repairs. Well we did and we got a reply from Motorola with a picture of the cracks saying this was customer abuse and that it is not covered under warranty. Even though they did not find any physical damage to back it up. Well I e-mailed them back and told them I did a little research and found pages of people having the same problems. Well I did not hear from them until I received a notice from Fed Ex that they were sending the phone back. NOT FIXED!!! I went to look up why and guess what there is no case open any more for the phone. It has been wiped clean. I put in the RMA # it comes back not found, I put in the ID #, the SN# and all comes back not found. Yet a day earlier all the info was there. I know there is a lot more people like me and all of you, but they just don't want to be bothered so they pay to have it fix, just to have it do it again. Unless they have found the problem and only fixing it on a customer pay only set up. I am furious and will not be recommending this phone to anyone. And to think I was considering this phone for my next up grade! NOT!!!!

  • Hi I have trouble in using alternative characters from the glyphs panel in illustrator CS5.

    I have recently installed the CS5 version of Adobe Creative Suite I have purchased long ago.
    I have trouble using the alternative characters from the glyphs panel. The problem doesn't happen with a specific font but a few.
    There are fonts that work fine and fonts that do not (either true or open type fonts)
    I can see the characters alternatives in the glyphs panel but when clicking only the normal characters appear.
    I have also tried to re-install the fonts but didn't fix the problem.
    Reading from previous posts that other users had same problem they concluded that there has been a problem / bug with the CS5 version glyphs that needed to be fixed
    Is this the case? What shall I do?

    Hi - I have found the update so problem solved !

  • Prevent Text Boxes to shrink as big as the text in it - move existing InfoPath form from SharePoint 2007 to SP2013

    Hello Together,
    we have some simple InfoPath forms in place. With SharePint 2007 they are working well. Now we will move to SharePoint 2013.
    It was easy to re-publish them on a SharePoint 2013 Site and to work with, but i have an optical / technical error and i don't find the solution.
    We use Text Boxes to collect the data from the user. After the user has filled the form we will submit them via mail.
    I will you show you the problem.
    on SharePoint 2007 --> it looks okay
    on SharePoint 2013 --> not okay - the Text Box is shrinked to the text Size and the design is defect
    How can i prevent this?
    Thanks in advance
    Sebastian
    I can provide Screenshots, bit at the moment my account is not verfied...

    Can you please share screen shot.
     Before try removing the field form View and  Add it again - check it
    Velu K

  • Why does my book have a lot of 'A's in the text?

    I am new to this. I bought a Sony Ereader and successfully bought a book from WHSmiths (somebody has to and I wanted to test it out) and transferred it to the PRS600 with the Sony Elibrary software. Then I bought a book from Waterstones but first had to download and install Adobe Digital Editions which seems to be exactly the same as Elibrary. So now I have 2 libraries going. However when I transferred the latest book I noticed that the letter A kept cropping up in the text especially where there were mathematical equations and always in front of the £ sign. As the book is on maths this is not good so I phoned the Waterstones helpline who said the computer wasn't authorised although the software says it is. They've let me download the book another 2 times but the result is the same. Does this happen normally in the world of ebooks or do I have a problem ?  Any advice gratefully received.
    Budgie

    If you can view the book at all in ADE (or the Sony EBL), then it's authorized to you.  If it's not authorized there will be an error: a dialog that says the book is not authorized to you (ADE), or the infamous "Protected Page" error (on the Sony Reader). (I'm not sure what Sony EBL does).
    The A seems funny. ADE will replace glyphs that it can't find in the current font with a question mark (or sometimes boxes).  This is an indication that the creator of the PDF or ePub file did not embed the font for character in either the embedded or default fonts.
    Do the A's appear in ADE, or just on the Sony Reader?

  • Plain ascii files have (ctrl-v)(ctrl-m) characters on the end of every line.

    Mac book Pro running 10.8 mountain lion.
    My preferred editor is vim (it comes with 10.8).
    When I re-edit a plain ascii file, every line ends with (ctrl-v) (ctrl-m).
    They appear after saving the file to hard drive.
    It started doing this just after moving from 10.7 to 10.8.
    question 1: Is there some way to turn off this feature?
    question 2: I wonder what I did to accidently turn on this feature?

    Hi,
    >>A CHAR datatype and VARCHAR2 datatype are stored identically (eg: the word 'WORD' stored in a CHAR(4) and a varchar2(4) consume exactly the same amount of space on disk, both have leading byte counts).
    Ok, but on the other hands:
    SGMS@ORACLE10> create table x (name char(10), name2 varchar2(10));
    Table created.
    SGMS@ORACLE10> insert into  x values ('hello','hello');
    1 row created.
    SGMS@ORACLE10> commit;
    Commit complete.
    SGMS@ORACLE10> select vsize(name),vsize(name2) from x;
    VSIZE(NAME) VSIZE(NAME2)
             10            5
    SGMS@ORACLE10> select dump(name),dump(name2) from x;
    DUMP(NAME)                                         DUMP(NAME2)
    Typ=96 Len=10: 104,101,108,108,111,32,32,32,32,32  Typ=1 Len=5: 104,101,108,108,111Cheers

  • Hi, I just updated to ff6, when i open a new browser the tab bar is missing....however when i hit Ctrl+T i get the tab bar back with the original tab and the new tab. I have box checked in options "always show the tab bar". Any help greatly appreciated

    Using Windows XP and Firefox 6....tab bar has gone missing but returns when i open a second tab. I used to be able to open a browser which opened my bookmarked homepage and I cold then click the + to the right of this tab and open a new tab.

    hello, please install the search reset addon - it will revert the most common customizations those adware programs do in firefox back to the default: https://addons.mozilla.org/firefox/addon/searchreset/

Maybe you are looking for

  • My skypein number suddenly doesn't work!

    Dear Moderator (or whoever can help): I have been using the skype number +852 81926138 and it has been working just fine for a little more than 3 months. All in a sudden, I try calling myself using my landline and a long sounding (i.e. not working) t

  • Little Problem With Zen Mi

    Just after I finish ripping a cd onto my Z.M., I check to see if the songs I uploaded r actually there, and the "back" button doesnt work very well. All the other buttons work fine but that is just a bit harder to press. after a bit it gets better an

  • Label in Candlestick chart.

    Hi Guys, I have a requirement to display labels above the columns in a candle stick chart in flex 3. Is any1 having any idea about how to acheive this?

  • Setting up two wrt160n

    I have two wrt160n routers I want to setup on each side of a large building to get full coverage.  I can wire both two routers together or have them both wired directly to the incoming internet.  What is the recommended way to set this up and how do

  • Administrator Account No Longer a Login Option?

    Hi there! I've got an iMac, circa 2004, running Panther. I've had two accounts since I got the machine: one (me) administrator and one (my son) user account. It's worth noting that I know a fair amount about PCs and virtually nothing about Macs. Whic