Calculated Hex to Unicode for display in label

Hi
I want to calculate an integer, convert to unicode and display the appropriate character in a label. I can display the correct chinese character if I pass a string literal e.g. "\u4e00" to the setText method. But I dont want to have hardcoded string literals in my program. Of course the compiler insists on having the complete string before hand (i.e. cannot add the "\u" to my calculated hex string). So how can I get the label to display the actual character using just the hex number? Is it possible?
TIA

I want to calculate an integer, convert to unicode and display the appropriate
character in a label. I can display the correct chinese character if I pass a
string literal e.g. "\u4e00" to the setText method. But I dont want to have
hardcoded string literals in n my program. Of course the compiler insists on
having the complete string before hand (i.e. cannot add the "\u" to my
calculated hex string). So how can I get the label to display the actual character
using just the hex number? Is it possible?Sure it is; don't be misled by all that hexadecimal stuff. A character is just an
integer value in the range 0x000 - 0xffff (two bytes unsigned numbers). Here's
a small example:JLabel lab= new JLabel();
char c= 0;
do {
   lab.setText("A char: '"+c+"'");
   // do something with the label;
} while (++c != 0);kind regards,
Jos

Similar Messages

  • How to switch display of label for SelectOneRadio in horizontal layout

    Using selectOneRadio with the horizontal layout and it displays the label and then the radio buttons to the right of the label.
    LABEL RADIO1 RADIO2 RADIO 3
    Is there a way to display the radio buttons to the LEFT of the label instead?
    RADIO1 RADIO2 RADIO3 LABEL
    Another question .... instead of radio buttons, we'd like to use check boxes instead, with the same functionality as the selectOneRadio ... just checkboxes instead of radio buttons.
    Can't find anything like selectOneCheckbox though, just a SelectBooleanCheckbox or SelectManyCheckbox, which won't work.
    Thanks for any help.

    Hi,
    you can use combination of selectOneRadio and outputLabel so in selectOneRadio leave label blank and put this text in outputLabel component, which you store to the right of selectOneRadio
            <af:panelGroupLayout id="pgl1" layout="horizontal">
              <af:selectOneRadio id="sor1" layout="horizontal">
                <af:selectItem label="label1" value="1" id="si1"/>
                <af:selectItem label="label2" value="2" id="si2"/>
              </af:selectOneRadio>
              <af:outputLabel value="outputLabel1" id="ol1"/>
            </af:panelGroupLayout>regards,
    Branislav

  • Display a label for every other category on a graph

    I have a line graph created in Illustrator with years on the horizontal axis (1998, 1999, 2000, 2001, 2002, etc.). There is data for each year that will be plotted on the line, however I would only like to display every other year (1998, 2000, 2002, 2004, 2006, etc.). Is there a way to show every other year on the horizontal axis.

    I can't leave the years out because there is data for those years. In Excel, there is an option to 1 display a label for every category, 2 to display a label for every other category, 3 to display a label for every third category. How do you do it in Illustrator. My table looks something like this but begins in 1980.
    "2001"
    52
    "2002"
    56
    "2003"
    81
    "2004"
    84
    "2005"
    91
    "2006"
    97
    "2007"
    102
    "2008"
    103
    "2009"
    104
    "2010"
    110
    "2011"
    106

  • Difficulty with java Unicode for internationalization

    First, my appologies for the cross-post. I'm not sure if this is a
    configuration issue, simple java / jsp problem or something others
    performing internationalization may have encountered.
    We're generating UTF-8 HTML pages using .jsp's, Weblogic 5.1 sp5, jdk
    1.2.2 and NT 4.0 w/ the Euro patch.
    We have the ability to serve UTF-8 encoded data from flat files and our
    database but we're having some problems serving Unicode that have been
    "escaped" into java variables.
    If we use the &#nnnnn (nnnn is decimal unicode value for character) HTML
    method for displaying unicode characters, they display just fine.
    However, if we create a java String or char and push a character into it
    via \uNNNNN (NNNNN is hex unicode value for character) and then display
    the content of this variable through the HTML page, something goes
    awry. Here's an example:
    <% String checkChar = new String("\u0000");%>
    <td class="smallfont"><% checkChar = "\u00A5";%><%=checkChar%></td>
    <td class="smallfont"><% checkChar = "\u20A5";%><%=checkChar%></td>
    <td class="smallfont"><% checkChar = "\u30A5";%><%=checkChar%></td>
    This should display the Yen symbol, Mil Sign and a Katakana small 'u',
    respectively. Oddly enough, it displays the Yen symbol all three
    times. I've had similar results with other series of Unicode characters
    (several Unicode characters that share the same second hex digit.)
    If you want to see this via HTML, check out
    http://dev.slingshotcorp.com/char.jsp.
    We've added "-Dfile.encoding=UTF8" to the java invocation in
    startWebLogic.cmd and we've verified that the setting is persisted into
    the .jsp. Unfortunately, our output isn't affected.
    Anyone know what I'm doing wrong? It appears that java is somehow
    assuming the first hex digit is always "00." Does this sound familiar
    to anyone?
    Thanks - Jackson

    Hello Earl,
    I was having similar problem.
    I was able to display &#nnnnn and the chinese character
    from database, but not \unnnn.
    I think Kevin Burns was making a good suggestion by
    giving page directive in your jsp file (UTF8) 'cause that's what
    I did AND it started to display \unnnn just fine from
    my property bundle files. You may give a try!
    But my problem is that after I gave the UTF8 page directive,
    the stuff I'm reading from db (oracle 8.1.6, with NLS_LANG)
    displayed as garbage. Do you think it's because that
    WLS supports only Unicode?
    thanks,
    --Renqi Li
    Earl Bob wrote:
    Has any else come across this gem? I think this is the root of my problem.
    "Caution: Currently, WebLogic JSP only supports 8-bit character sets. "
    http://www.inf.fu-berlin.de/lehre/WS00/SWT/BEA/documentation/docs51/classdocs/API_jsp.html
    The most recent Weblogic documentation has revised this statement to:
    "WebLogic JSP supports mulitbyte character sets according to the Unicode
    standard. "
    http://www.weblogic.com/docs51/classdocs/API_jsp.html#wljsp
    We believe that the 16-bit characters we're passing around through Java
    variables are being cliped to 8-bit characters as they're written to HTML.
    Does anyone know when (which service pack) provided WL 5.1 JSP with the
    ability to handle multi-byte charactersets? We're currently using WL 5.1
    sp5.
    Thanks - Jackson

  • Displaying Summary labels

    Hi All,
    Is it possible in discoverer plus to display the summary label in column other then the one where the Totals is calculated?
    for eg:
    Here the subttotal on sal column is calculated for every department. I want to display the label "Total for Dept" under Emp name coulmn instead of salary column.
    ============================
    Dept | Emp Name | Sal
    1 | abc | 5000
    | def | 1000
    | Total for Dept1: | 6000
    2 | fff | 5500
    | sws | 1000
    | Total for Dept2: | 6500
    Thanks & Rgds,
    Shruti..

    Hi Shruti,
    Don't think we can show the totals in columns other than the one where actual data exsists. What you can do as a workaround is create a view in the database using UNION Clause to have the data formatted acc to your requirements. Later you can import the View in Business Area and pull up a report in Disco Plus using this View.
    CREATE OR REPLACE TEST_VIEW AS
    SELECT dept, emp_name, sal from my_table
    UNION
    (Ur Total Query)
    Gd Luck !
    ~Chinmay
    PS: You might have to format the View to have department wise sub-totals

  • Mobile 3.1 can't find bundle for base name labels

    Hi all.
    I installed the Business Objects Mobile 3.1 few days ago on a dedicated server without using proxy server because the installation is in test mode with no external access. Both products (BO Enterprise XI3.1 & BO Mobile 3.1) are installed on separate Windows Server 2003 machines. The installation has the default database (Apache Derby) and both services (VAS & VMS) are working. The mobile device is a virtual device on my PC using Windows Mobile 6.1 operating system.
    The client application has been installed on mobile device and users can succesfully log on to the CMS using Enterpise Authentication method. After this two folder icons are displayed on screen, first for Local Documents and second for Server Documents. Clicking the Server Documents the following error message is displayed on screen "Can't find bundle for base name labels, locale el_GR (0x15)"
    I tried to resolve the problem changing the regional settings from Greek to US in servers, my PC and Virtual Device but the exact error still appears. Does anybody knows what to do or where to look for a solution?
    Thanks for reading my message. Happy and creative new year for all.

    Here is my suggestion.
    Do you have the property file named "webui-resources_en_US.properties"?
    Here is the example
    language="en"
    country="US"
    locale = new Locale(language, country);
    bundle = ResourceBundle.getBundle("com.<companyname>.webui-resources");
    copy the webui-resources_en_US.properties file to the directory
    com.<companyname> in your workspace/IDE/localdirectory. or ftp that file to classes/com/companyname directory
    This should work. I am using it that way.
    which appserver r u using?

  • When I resize the font for the Page Labels on the tab control in LabVIEW 7, the Increment/Decrement size gets messed up. Is there a solution to this problem or is this a bug?

    I have noticed in LabVIEW 7.0 and 7.1 that when the text in the page labels display is enlarged, that the arrows enlarge but the top arrow enlarges more then the small arrow but then when you decrease the text size, the arrows stay remain large. This is not a problem in 6.1 because the arrows aren't available. Is there a work around for this bug or do I have to use small text for these page label arrows to look right?

    I must admit that I've never used the page labels display and it does look like a bug. You can fix it however. Select the tab control and choose Advanced>Customize. In the control editor, select the page label control and do the same thing. You should be in the control editor for the numeric control and then you can go to edit mode and enlarge the decrement arrow to make it the same size as the increment.

  • Blank not Zero for Display in report

    Hi,
    For a Particular Calculated Key Figure X, I get a Zero value using a logic such as
    if Y=0; X=0.
    For Display in Report, Currently it shos the vakue as Zero. I want to show it as a blank vaklue instead.
    Could you suggest how to achiev this ?
    I can not suppress Zero becuase for the other Key Figures in the report, i should show 0 as 0 only.
    Please acknowledge
    Regards
    Shweta

    Hi,
    In the query designer, go to query properties, the button is just before the check query button.  In the Display tab, in the section Number format, you have a setting for Zero Value Display.  Click on the options and select, Suppress Zeros.  You also have the option of showing the zero as something else.
    This setting is different from the Suppress zero setting, which will suppress the line when all key figures are zero.
    Rgds

  • How to display mapviewer labels in two lines instead of one?

    Hi,
    I have been using the addJDBCTheme to display the map along with the labels as follows:
    mapviewer.addJDBCTheme("aaa","a", "SELECT geom, col1 || ':' || col2 label_value from table_name","GEOM","","styleName","label_value","T.ROAD NAME" ,false);
    So the label is displayed as col1Value:col2Value.
    Now I need to display the label as follows:
    col1Value
    col2Value
    I tried using this
    mapviewer.addJDBCTheme("aaa","a", "SELECT geom, col1 || chr(10) || col2 label_value from table_name","GEOM","","styleName","label_value","T.ROAD NAME" ,false);
    But it doesnt work. This displays col1Valuecol2Value
    So I tried using this:
    mapviewer.addJDBCTheme("aaa","a", "SELECT geom, col1 label_value from table_name UNION ALL SELECT geom, col2 label_value from table_name","GEOM","","styleName","label_value","T.ROAD NAME" ,false);
    This actually works. Meaning it displays the label in two lines. But the two lines are almost attached together, there is no space between them at all. It is sometimes very difficult to read.
    Would really appreciate any suggestions to resolve this issue.
    Is there any other solution to display a label in two lines? I tried changing the label style to set the line-height. But that does'nt work either.
    Lakshmi

    Multiline label aren't supported as yet.
    JayantDoes MapViewer 10.1.3 (the latest version for present) support it?

  • Converting PDF to RAW for display in the portal

    Hi all,
    We have an application that took a pdf and converted it into a raw datastring to pass to the portal for display purposes.
    We have migrated this function to a unicode system and are now struggling to get this to work.
    Code in non-unicode system
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize   = e_filesize
        TABLES
          otf            = lt_otf
          doctab_archive = lt_doctab_archive
          lines          = lt_pdf.
      LOOP AT lt_pdf INTO wa_pdf.
        CLEAR et_pdf.
        MOVE wa_pdf TO et_raw.
        APPEND et_raw.
      ENDLOOP.
    Now in the unicode system.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize   = e_filesize
        TABLES
          otf            = lt_otf
          doctab_archive = lt_doctab_archive
          lines          = lt_pdf.
        FIELD-SYMBOLS: <x_wrk_line> TYPE rmps_raw134,
                       <x_struc> TYPE xstring.
        DATA: buffer1 TYPE xstring,
              conv TYPE REF TO cl_abap_conv_out_ce.
    Convert PDF to RAW Type
      LOOP AT lt_pdf INTO ls_pdf.
        CLEAR et_raw.
        MOVE ls_pdf TO lv_pdf_line.
        ASSIGN buffer1 TO <x_struc> CASTING.
        ASSIGN et_raw-rawline TO <x_wrk_line> CASTING.
        conv = cl_abap_conv_out_ce=>create(
               encoding = 'UTF-8'
        conv->convert( EXPORTING data = lv_pdf_line
                       IMPORTING buffer = buffer1 ).
        <x_wrk_line> = <x_struc>.
        APPEND et_raw.
      ENDLOOP.
    If we simply download the pdf after we have tun the  'CONVERT_OTF_2_PDF' Fm the pdf created is fine.  However when we view the output in the portal of the pdf (as streamed in the raw format) we just get chinese looking (they may well not be any language) characters in the pdf. 
    With a non-unicode R/3 system the pdf was displayed without any issues in the portal.
    Any help appreciated.
    Thanks,
    Paul

    Hi, could you kindly share the complete set of this conversion? i also need similar requirement.
    thx so much.
    regards,
    Rudy.

  • CRM2007 unicode system display broken charactor downloaded non-unicode R/3.

    Hi all
    CRM2007 is only unicode system and R/3 is 620 non_unicode system.
    CRM2007 unicode system display broken charactor downloaded data from non-unicode R/3.
    how can I do??
    any help
    thanks

    Lee,
    Technically it is not supported.  You could change a few middleware settings to transmit the bdocs as XML to prevent issues, but really if your CRM is unicode then ERP needs to be unicode and vice-versa.
    Only exception is that generally the english code-page non-unicode works okay with unicode english.
    You can adjust CRMRFCPAR for the bdoc to transmit in xml vs native.
    Take care,
    Stephen

  • Unicode for Playbook

    Hi,
    How can I view Unicode Fonts on my Playbook V2.0?
    Regards,
    -Pankaj

    Whether Unicode is displayed correctly depends very much on the app, not so much on the PlayBook OS. While the OS and the on-screen keyboard may not support all languages & locales, apps can support whatever fonts they like.
    Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands

  • Unicodes for portal

    hello experts,
    we have a requirement of converting contents displayed into 2 languages.
    we need to display the contents in english and marathi.
    can anybody suggest a link where i can get unicodes for portal which we can paste into our properties files for display in marathi??
    waiting and thanks in advance
    -jagdish

    Jagdish,
    we had a similar requirement previously.
    you can get these conversion done at :
    http://people.w3.org/rishida/scripts/uniview/conversion
    but an additioal activity of appending \u to codes is needed to be done for every 4 digit code generated.
    regards
    Kedar
    reward points if useful

  • Block stock calculation from mseg table for any given date.

    I am calculating stock from mseg table for any given date. Not just month end stock or current stock. It could be back date also. It is tallying also with MB5B stock report of that date. Now I have to bifurcate that stock into unrestricted stock, quality stock and block stock.
    I have checked INSMK and ZUSTD field in mseg table, but could not concluded. Should I check movement type wise? Block/ Quality stock could be transferred into unrestricted stock also. That also I have to take care.
    Can anyone clearly explain how the stock type posting takes place in mseg table when goods receipt as block / quality stock and when the same goods transferred in unrestricted stock, what are the reference indication.

    DATA : LIST_TAB TYPE TABLE OF ABAPLIST.
    DATA: BEGIN OF VLIST OCCURS 0,
          FIELD1(5)  TYPE C,
          FIELD2(19) TYPE C,
          FIELD3(16) TYPE C,
          FIELD4(17) TYPE C,
          FIELD5(25) TYPE C,
          FIELD6(24) TYPE C,
          FIELD7(25) TYPE C,
          FIELD8(25) TYPE C,
          END OF VLIST.
    TYPES : BEGIN OF ITAB,
           MATNR(18) TYPE C,
           WERKS(5) TYPE C,
           END_MENGE(20) TYPE C,
           END OF ITAB.
    DATA : ITAB TYPE STANDARD TABLE OF ITAB WITH HEADER LINE,
            WA_TAB TYPE ITAB.
    ----submit command to run mb5b in the background and -
    ----push the data into an internal table -
    " Calling MB5B for displaying the Closing Stock
    SUBMIT RM07MLBD USING SELECTION-SCREEN  '1000'
                    WITH DATUM BETWEEN S_DATE-LOW AND S_DATE-HIGH
                    WITH MATNR IN S_MATNR WITH WERKS IN S_WERKS
                    WITH BWART-LOW = '601' EXPORTING LIST TO  MEMORY
                    AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        LISTOBJECT = LIST_TAB
      EXCEPTIONS
        NOT_FOUND  = 1
        OTHERS     = 2.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        LIST_INDEX         = -1
      TABLES
        LISTASCI           = VLIST
        LISTOBJECT         = LIST_TAB
      EXCEPTIONS
        EMPTY_LIST         = 1
        LIST_INDEX_INVALID = 2
        OTHERS             = 3.
    LOOP AT VLIST WHERE FIELD1 CS '|'.
    CHECK SY-TABIX GE 4.
    MOVE :  VLIST-FIELD1+1(4) TO ITAB-WERKS,
            VLIST-FIELD2+1(18) TO ITAB-MATNR,
            VLIST-FIELD8 TO ITAB-END_MENGE.
    APPEND ITAB.
    ENDLOOP.
    This is the program to call MB5B and the standard program and use the following settings for the closing stock opening stock and block stock

  • How can I connect my TV sony bravia to Imac for display !

    How can I connect my TV sony bravia to Imac for display ! I did it before but a week ago crash my sistem and been to apple store london to fix it and wend I come home I can not reconnect the tv to imac ! please help !!!!!!!!!!!

    I BUY A CABLE FROM AMAZON.CO.UK AND MY iMAC WAS WORKING WITH THIS CABLE BUT AFTER THEY (APPLE STORE REGENT STREET ) REPARIT NOW IS NOT RECONICE THE DISPLAY !!!!!

Maybe you are looking for

  • Trying to read an XML file from the resources

    Hi, I am having a problem reading a file from the resources: In my project I have data.xml in my project resources folder. I tried the following and it does not work: File xsltFile = new File("resources/data.xml"); or File xsltFile = new File("/resou

  • Show/hide elements in DW CS3

    I've just posted this question and got a reply from John Waller, thanks John, but what I mean is that I don't want to use layers, this has to do with the positioning in a table. I want to add images to a table which is in a layer so I can put margin-

  • Trouble printing markups

    I need to be able to draw trim lines around art in PDFs.I discovered that I could easily draw a box around them in Acrobat with the Markup tool, but then, the box won't print. How do I get it to print? I'm using Acrobat 9 Pro, on Windows 7 Thanks in

  • Formatted iDVD project complete with Themes, etc...burning through Toast?

    I need to use Toast to burn my completed iDVD project. Worked a looong time making it perfect with formatting using Themes, custom Text pages, etc... I'd hate to lose all that, but need to use Toast to compress the video to fit a Single Layer DVD. Do

  • Where is the Property Editor - Portal_server ?

    Hello: I'm following this <a href="http://help.sap.com/saphelp_nw04/helpdata/en/c4/fd584289e59041e10000000a1550b0/frameset.htm">documentation</a> and I can't find the Property Editor - Portal_server. Thanks. RLS.