Try to show special characters in a JLabel

Hi everybody,
I have a big problem with special characters and to display them.
At the moment I'm writing an Applet where you can type in
in a JTextField stuff like \u0398 \u03B6 \u03A6 \u03C9 \u03BE.
Then you press a JButton and the method TextField.getText();
gives the input to a String. After that with the method
Label.setText(String);
i want to display the special characters, but they weren't shown.
Instead of its the typed in characters (\u0398 \u03B6 \u03A6 \u03C9 \u03BE) appear.
If I hardcode it, it works and every special character i want is displayed.
Label.setText("\u0398 \u03B6 \u03A6 \u03C9 \u03BE");
So what is wrong?
If some things are not so clear don't hesitate to ask me
Thanks in advance
swachtar

hi,
I think I have an idea of what is going wrong with your code:
The text in the JTextField is stored as a String in the Document. However, each character typed into the field will be stored separately, that means that the six characters typed have to be merged into one. So try creating a new String object from the textfield data and pass this one to the label:
JLabel label;
JTextField textField;
label.setText(new String(textField.getText()));
I don't know whether this works, but this is the only idea comming to my mind right now.
best regards, Michael

Similar Messages

  • Trouble showing special characters on pdf s on ipad

    Hi. My ipad doesnt show some special characters (like omega). The is a problem when opening a pdf in safari, ibooks and goodreader, i.e. everywhere i try. Please, I need a solution since the ability to show pdf including those signs is why we got ipad at our company.

    Please, I need a solution since the ability to show pdf including those signs is why we got ipad at our company.
    I think the only solution is for you to try to get your material in another format, like .doc or .html, or modify the way the pdf's are created. Whether your current pdf's are made in some unusual way or iOS lacks something they need is hard to know. To tell Apple about the problem go here:
    http://www.apple.com/feedback/ipad.html

  • Skype Showing Special Characters as Boxes []

     Just less than an hour ago, I had a problem with some virus-extensions. I did necessary uninstallments and downloaded Adwere to make sure the extensions are gone for good. Once I've done so, Adwere uninstalled many different files. So far, no problem with anything in Skype. Except my name and other special characters.
    Like, now some Japanese/Chinese/Korean ETC. characters are showing as boxes. What bothers me the most is my name. It used to be (づ。◕‿‿◕。)づ but now it shows like this: http://puu.sh/cndAy/f9f6c721dc.png . I'd like to keep the same font, Tahoma (8 points) because it has been the same always and my name and other characters in my friends' names ETC. where always shown. So any solution instead of changing fonts/installing fonts is appreciated because I'm so used to Tahoma's look on the many years I used Skype and don't want any change.

    You're right that whitespace doesn't show as squares anymore (I think they did in the past), but everything else seems OK.
    Why don't you try something like this and prove for yourself:
    select '     
    !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' from dualRegards,
    K.

  • How to show Special Characters like (∠) in an Embedded text field

    I want to show some special characters like (∠). It is working fine if we don't embed the text field. But I want to use superscript and subscript font, so I have to embed that dynamic text field. When I embedd the texfield it does not show me the (∠) symbol. Instead it shows me a square symbol. Please let me know how can I solve this problem. My project is nearly finish except for this part.
    Thanks in advance
    Salim

    Yes, I know we need to include the symbols. But  I am unable to include it. Whenever I click on embed option and paste the symbol (∠) in the include these characters box, it appears as a square symbol. This is driving me nuts.
    I even tried to embed All (54665 glyphs). But this is not working either.
    Has anyone faced this problem before?

  • Can't show special characters (ÆØÅ) in pdf fields created with inDesign CS6

    Hi Guys im having a problem with special characters in pdf's form fields created in inDesign CS6
    instead of the character ÆØÅ it creates squares or some other seemingly random character
    Here's the pdf

    I figured it out
    Just in case people had the same problem here is how it's done: (i misunderstood the two posters above me, so you are actually going to change fonts within acrobat, like they said, and save it)
    Open the pdf in acrobat, go and change font settings for each of your fields and change the font under the "Appearance" tab.

  • Identify and show Special Characters in the SQL result set

    Hi all,
    The values in a column (SC - colunm name) has special characters. For eg. 496+>9, 223'32, 167&45. Is there any function in Oracle that would give me the below result when i query that colum.
    select SC from xyz;
    Result should be as follows:
    496+&gt;9
    223&apos;32
    167&amp;45
    Thanks in advance.

    yes it will have numbers and characters also along with the special characters
    The results from my previous post was wrong. Here is the expected results;
    496+&gt;9
    223&apos;32
    167&amp;45
    can you give me the exact query to get the above resultant.
    Thank you

  • Special characters not showing

    Hello, I am having a strange problem with showing special characters in the browser when I upload the site. (its fine when I view it on localserver)
    For example on my website: http://www.reese-test2.co.uk/
    if you do a search for example: 3GLG534WW - instead of seeing the degree symbol there is a �
    it should read 35° beam angle not  35� beam angle
    I know i could go through all 500 products and change the beam angle character on my SQL database to:   35&deg;
    But surely there is an easier way? This being a lighting website for my work I have other special characters that will also show up weird, so would be good if there was an easy fix to this. I am using WAMP, and DW CS6.
    Is there a line of code I can add to my results.php page that will force the characters to show properly?
    thanks
    Sara

    Hi Just thought I would update this post. My server provider said they cannot change the character set due to how they were set up, so had to do a find/replace in PHPmyAdmin - (SQL tab) instead.
    Ken thanks for your idea. This didnt initially work for me, so googled it and had to make a couple of changes to the code, but this then worked. "Replace" needs to be in caps and the brackets removed.
    Original:
    update [table_name] set [field_name] = replace([field_name],'[° ]','[&deg;]');
    Correct:
    UPDATE productsearch SET description = REPLACE (  description,  ‘°’,  ‘&deg;’);
    thanks for your help Ken Binney
    Sara

  • Barcoding -- Special Characters

    I am using Oralce 10g Reports Builder to build a report, that would barcode some special characters like TAB, CARRIAGE RETURN, LINE FEED(NEW LINE) etc. I am currently using the oraclebarcode.jar(java bean) method to develop such barcodes. But this ends up with an error!
    REP -1401 'formulacol' fatal PL/SQL error occured
    ORA-39565 Message 39565 not found Product=RDBMS; Facility=ORA
    My code that i use for this formula_col is
    function CF_1Formula return Char is
         myFileName varchar2(500);
         result varchar2(500);
         barcodeData VarChar2(50) := :chr_008;     
         begin
              if :chr_008 is not NULL then
         myFileName := srw.create_temporary_filename;
         barcodemaker.setBarWidthInch_8345(globals.bcobj, 0.005);
         barcodemaker.setBaseCodeData_6913(globals.bcobj,barcodeData);
         barcodemaker.setBarCodeType_6913(globals.bcobj,globals.barcode_to_use);
         barcodemaker.setFullPath_6913(globals.bcobj, myFileName);
         barcodemaker.renderBarCode_9797(globals.bcobj);
         return(myFileName);
              else
                   return(' ');
              end if;
    end;
    the same code produces barcode for any othe characters(normal characters, 0-9, A-Z, a-z), but spits the above error only if i try it for special characters.
    Any help to generate barcodes for such special non-printable characters would be greatly appreciated
    Srivatsan

    I can't find any .plist files in
    Home/Library/Preferences that refer to CharPalette,
    Surely you must have one called
    com.apple.CharPaletteServer.plist?
    also how can I find files which start with a period
    We're not talking about files that begin with a ., but rather files that end in .plist.

  • Special Characters in Flash 8 dynamic myHTMLdata

    how do I set up "&" and "–" to display in the
    dynamic text fields from the .txt files? The following works in DW
    but not in Flash 8:
    myHTMLdata=LTCG offers administrative & consulting
    services as well as IT solutions.
    We have developed many proprietary systems and protocols
    &#8212; both operational and intellegence-based &#8212;
    that can be directly applied to your business.
    Thank you

    Jeff3d wrote:
    > how do I set up "&" and "?" to display in the
    dynamic text fields from the
    > .txt files? The following works in DW but not in Flash
    8:
    >
    > myHTMLdata=LTCG offers administrative & consulting
    services as well as IT
    > solutions.
    > We have developed many proprietary systems and protocols
    &#8212; both
    > operational and intellegence-based &#8212; that can
    be directly applied to your
    > business.
    You need URL Encoding not HTML tags in order to show special
    characters from
    your text file:
    %26 for & and %3F for ?
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Keyboard repeat goes to special characters

    Hello,
    Noticed since i upgraded to OSX 10.7, that when i hold down a key on the keyboard, a little box pops up that shows special characters that corrsepond to that specific letter. For example, when i hold down the letter "o", i get options for the following letters: ôöòóœøōõ
    is there anyway to change the settings so that the letters will repeat when i hold down a letter?
    Thanks All.
    ~Brandon

    Ditto - thanks for the Terminal command.  I had been resetting, rebooting, cleaning, etc., and no results.  Now, I don't know exactly when the repeat problem arose, but I became aware of it when a few of my keys on my MBPro were reluctant or didn't work.  I then "discovered" the repeating problem.  The problem keys had cleared up but now I was faced with the repeat issue - may have been there a while since one doesn't use the fast repeat that often.  All better now...
    Tom

  • Special characters in SBWP dynamic columns are not showing for some users

    Hi experts,
    We have set up a dynamic columns for business workplace. One of the field displays the comments entered by the user. Some users are able to see the values entered perfectly. But for some users, if we enter special characters like @gopal, it is not displaying the value in dynamic column.
    Are there any workflow/user settings need to be changed.
    Thanks
    Gopal

    I had the same issue, you should check the link between AD and CRM, so you could make a new user in AD and connect your CRM account with it, then you should return the old AD account back. It worked for me, try it :)

  • Special characters are not showing properly in FF.

    I am developing an website where user can input special characters like '¥' or '╩' like this. I have to store these value to DB and wold display it from DB. When I try to fetch these value from DB, it looks like '�'. I am using <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> in my jsp page. This is working fine in Chrome, problem occurs with FF only. Please help.

    Are you serving the page fully formed, or inserting the characters into the page from an XMLHttpRequest? Could you post a link to a page demonstrating the problem?

  • SSID with special characters showing up in place of the letters

    On a Win 7 machine the SSID list of available wireless networks is showing up with special characters in place of the normal letters in the name of the SSID... It has nothing to do with the Linksys Router, it is a problem on this computer. It makes it impossible to connect to a wireless network. I removed the device and reinstalled it hoping that might help. I can't find any viruses, (Known Viruses) Has anyone here seen this before? I am atttaching a photo of this. Any help appreciated.

    marke1102 wrote:
    On a Win 7 machine the SSID list of available wireless networks is showing up with special characters in place of the normal letters in the name of the SSID... It has nothing to do with the Linksys Router, it is a problem on this computer. It makes it impossible to connect to a wireless network. I removed the device and reinstalled it hoping that might help. I can't find any viruses, (Known Viruses) Has anyone here seen this before? I am atttaching a photo of this. Any help appreciated.
    Is this the only computer having a problem? How many wireless devices are connected and working to the router right now?

  • Weblogic 12c Servlet Response - Special characters show up as question mark

    My web app is running on Weblogic 12c (12.1.1) using WebWork + Hibernate. The program streams data (bytes making up a pdf) from a CLOB in an Oracle Database to the AsciiStream of the servlet output response. No exceptions are thrown, but the generated pdf contains blank pages. Comparing the bytes of the generated pdf, special characters are showing up as question marks.
    Some of the bytes read in from the database contain 8 bits (correct data), but the bytes that the servlet return contain only 7 (all bytes with 8 bits become "1111111"). The number of bytes returned from the servlet is correct.
    Code:
    //Response is HttpServletResponse
    response.setContentType("application/pdf");
    response.setHeader("Content-Disposition", "inline; filename=\"test.pdf\"");
    out = response.getOutputStream();
    byte[] buf = new byte[16 * 1024];
    InputStream in = clob.getAsciiStream();
    int size = -1;
    while ((size = in.read(buf)) != -1){
    // buf contains the correct data
    out.write(buf, 0, size);
    // other exception handling code, etc
    out.flush();
    out.close();
    "Correct" pdf byte example:
    10011100
    10011101
    1010111
    1001011
    1101111
    11011011
    Incorrect pdf byte example:
    111111
    111111
    1010111
    1001011
    1101111
    111111
    I have verified that the data read from the CLOB in the database IS correct. My guess is that the Weblogic server has some strange servlet settings that causes the bytes to be written to the servlet output stream incorrectly, or a character encoding issue. Any ideas?
    Edited by: 944705 on Jul 26, 2012 10:17 AM

    Solution found, I'll post the work around to those who might encounter the same problem.
    Somewhere in the layers of technology (webwork or weblogic I'd guess), the servlet response is encoded into UTF-8 regardless. The encoding in the database was ISO-8859-1. Sending ISO encoded bytes by UTF-8 caused the conflicting character codes (anything above 127) to show up as undefined.
    The fix is to decode the input byte array into ISO-8859 string, then encode that string into UTF-8, which can be send by Weblogic.
    isoConvert = new String(buf, "ISO-8859-1");
    out.write(isoConvert.getBytes("UTF-8"), 0, isoConvert.getBytes("UTF-8").length);

  • Special characters (norwegian wovels) not showing correctly in Page Layouts

    We have a publishing site which surfaces content from several catalogs in an authoring site in a cross site collection publishing environment.
    We have a problem with labels for Catalog-Item Reuse Snippets containing norwegian vowels/special characters not showing properly. An example of a snippet is shown below. This contains the character ø (oslash).
    <div class="rightColPaddingUnder"><h2>Leverandørkontakt</h2>
    <!--CS: [NavnhovedkontaktleOWSTEXT] Start Catalog-Item Reuse Snippet-->
    <!--SPM:<cc1:CatalogItemReuseWebPart runat="server" UseServerSideRenderFormat="True" ResultType="" NumberOfItems="1" UseSharedDataProvider="True" OverwriteResultPath="False" ResultsPerPage="1" SelectedPropertiesJson="[&#34;NavnhovedkontaktleOWSTEXT&#34;]" Title="$Resources:Microsoft.Office.Server.Search,CBSItem_Title;" Description="$Resources:Microsoft.Office.Server.Search,CBSItem_Description;" MissingAssembly="Cannot import this Web Part." ID="g_1d79f6d5_037f_43b3_ac4b_4e7bc10ff1c3" __WebPartId="{1d79f6d5-037f-43b3-ac4b-4e7bc10ff1c3}">-->
    <!--SPM:<RenderFormat>-->
    <!--DC:Viser verdi fra søk uten ekstra formatering.-->
    <!--SPM:</RenderFormat>-->
    <!--SPM:</cc1:CatalogItemReuseWebPart>-->
    <!--CE:End Catalog-Item Reuse Snippet-->
    </div>
    The frontend messes the character up and displays this as strange A
    We have tried several things in order to fix this but are running out of leads:
    tried to change encoding in the page layout html file from utf-8 to iso-8859-1
    tried to replace ø with the hex value (&#248;) and the old school & + oslash + ; way of encoding characters
    Regional settings on the server is verified to be norwegian
    The strange part is that actual content in the content type columns that we display around the page actually shows the norwegian characters correctly

    Excellent, thanks!. I checked the top level globalization setting i IIS and this was set to Windows-1252.
    However, our work around solution was to add the 
    <meta charset="utf-8">
    declaration inside the first MS-statement inside the body tag of the page layout HTML file like this:
    <?xml version="1.0" encoding="utf-8"?><!--SPG:
    -->
    <!DOCTYPE html[]>
    <html class="no-js" lang="en" xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <head>
    <title>Some title
    </title>
    </head>
    <body>
    <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderTopNavBar" runat="server">-->
    <meta charset="utf-8">
    <!--MS:<SharePoint:AspMenu ID="TopNavigationMenu" runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="&#60;%$Resources:wss,navigation_accesskey%&#62;" UseSimpleRendering="true" UseSeparateCss="false" Orientation="Horizontal" StaticDisplayLevels="1" AdjustForShowStartingNode="false" MaximumDynamicDisplayLevels="3" SkipLinkText="">-->
    Strange, but it worked.
    Actually we tried to set the globalization settings in the web.config files of the different IIS sites running in the webapp yesterday like this:
    <add name="SPWindowsClaimsAuthentication" type="Microsoft.SharePoint.IdentityModel.SPWindowsClaimsAuthenticationHttpModule, Microsoft.SharePoint.IdentityModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
    </httpModules>
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="nb-NO" fileEncoding="utf-8"/>
    <!--<globalization fileEncoding="utf-8" />-->
    <compilation batch="false" debug="false">
    As far as I can understand this should have the same effect as setting this in IIS.
    It seems that the IIS setting actually overrides whatever you put in web.config for globalization options.
    We have updated the IIS setting now to UTF-8 and done a IIS Reset. At the moment we get corrupted characters still, but now the existing aspx-files probably is corrupted and needs to be replaced with fresh ones. I will do a catalog dis-/reconnect.
    I'll update with whatever we end up with as the final solution. Anyway, very grateful for the invaluable help from a fellow Scandinavian :-)

Maybe you are looking for