Extended Ascii Code in Swing

Hi master,
I have found some viewing extended ascii code in Swing. The palteform I used is Windows Me.
It is not viewing properly for some of chars with ascii code more than 127 to 255.
Any idea would be appreciate.
Thanks in advance!

Hi,
This character is special one, so you can't print it out. In SAP all special charcter which can't be printed are replaced with placeholder #.  They are intended to do theri special purpose in flat file, once you open it.
Do the following:
- use fm HR_KR_XSTRING_TO_STRING to convert xstring with value  '1F' (30 decimal value) to string
- write this string to certain place in internal string table (where you want later use it in the file)
- download this table as to file
- special character will do its purpose in text file
This is the same functionality as you would be placing Line Feed (0x0A - 10 dec). It would be shown as # but once you open downlaoded file you don't see hash # anymore, but you see that new line in that place.
Hope this is clear
Regards
Marcin

Similar Messages

  • How to set extended ascii table to ISO Latin-1?

    Hi,
    I need to specify a ascii table set to ISO Latin-1... anyone know how to do this?
    thanks in advance

    226 is the correct integer value for the character 'â'. The "extended ascii codes" on the page you cited come from the [cp437|http://en.wikipedia.org/wiki/Codepage_437] encoding, which is not what you should be using. The reason you see that other character (I assume it's 'Γ') is because the console on English-locale Windows machines uses cp437 by default. So your program is outputting the value in the platform-default windows-1252 encoding, but the console is mistakenly decoding the putput as cp437. You can force the console to use the correct encoding with the CHCP command, e.g. CHCP 1252 Internally, Java strings use the [UTF-16|http://en.wikipedia.org/wiki/UTF-16] encoding, which is identical to [ISO-8859-1|http://en.wikipedia.org/wiki/ISO/IEC_8859-1#ISO-8859-1] for the first 256 characters. If you're going to refer to Latin characters by their integer values, that's the conversion table you should be using.

  • Problem showing Trademark symbol using ascii code in Flex 3

    I am facing problem in displaying trademark symbol (™) using ascii codes(it is showing square symbol). I have ascii code stored in the database for trademark symbol(ascii code "™" ). So I can't use Hexa code instead of ascii code. But using ascii code I am able to show copyright symbol. Following is the sample code :
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
        <mx:Script>
            var trademarkSymbol = "\u2122";
            var trademarkSymbol1 = "&#153;";
            var copyrightSymbol = "\u00A9";
            var copyrightSymbol1 = "&#169;";
        </mx:Script>
        <mx:Label text="Macromedia™"/>
        <mx:Label text="Macromedia{trademarkSymbol}"/>
        <mx:Label text="Macromedia{trademarkSymbol1}"/>      \\ problem  code
        <mx:Label text="Macromedia©"/>
        <mx:Label text="Macromedia{copyrightSymbol}"/>
        <mx:Label text="Macromedia{copyrightSymbol1}"/>
    </mx:Application>
    Please suggest some solution.
    Regards
    Rajat Sahni

    You must use Unicode values, not Windows extended ASCII values.
    The Unicode value of a copyright symbol is hex 00A9 or decimal 169. This happens to be the same as where it is in a Windows' extended ASCII character set, but this is irrelevant. The Unicode value of a copyright symbol is hex 2122 or decimal 8482. In Windows' extended ASCII it has a different value, hex 99 or decimal 153, but again this is irrelevant.
    So the reason you think it "works" for the copyright and not for the trademark is that the two character sets agree on the value of the copyright but disagree on the value of the trademark.
    Moral: Find a good Unicode table.
    Gordon Smith
    Adobe Flex SDK Team

  • Problem convertting certain extended ascii characters

    I'm having problems with the extended ascii characters in the range 128-159. I'm working with SQL server environment using java. I originally had problems with characters in the range 128-159 when I did a 'select char_col from my_table' I always get junk when I try to retreive it from the ResultSet using the code 'String str = rs.getString(1)'. For example char_col would have the ascii character (in hex) '0x83' but when I retrieved it from the database, my str equaled '0x192'. I'm aware there is a gap in the range 128-159 in ISO-8859-1 charset. I've tracked the problem to be a charset issue converting the extended ascii characters in ISO-8859-1 into java's unicode charset.
    I looked on the forum and it said to try to specify the charset when I retreived it from the resultset so I did 'String str = new String(rs.getBytes(), "ISO-8859-1")' and it was able to read the characters 128-159 correctly except for five characters (129, 141, 143, 144, 157). These characters always returned the character 63 or 0x3f. Does anyone who what's happening here? How come these characters didn't work? Is there a workaround this? I need to use only use java and its default charsets and I don't want to switch to the windows Cp1252 charset cuz I'm using the java code in a unix environment as well.
    thanks.
    -B

    Normally your JDBC driver should understand the charset used in the database, and it should use that charset to produce a correct value for the result of getString(). However it does sometimes happen that the database is created by programs in some other language that ignore the database's charset and do their own encoding, bypassing the database's facilities. It is often difficult to deal with that problem, because the custodians of those other programs don't have a problem, everything is consistent for them, and they will not allow you to "repair" the database.
    I don't mean to say that really is your problem, it is a possibility though. You are using an SQL Server JDBC driver, aren't you? Does its connection URL allow you to specify the charset? If so, try specifying that SQL-Latin1 thing and see if it works.

  • SQL Developer, UTF8 Oracle DB, extended ascii characters appear as blocks

    I have this value stored on the database:
    (Gestion Económica o Facturaci
    Notice the second word has an extended ascii character in it. When I use SQL Developer on my windows machine to view the data, I get a box in place of the o, kinda like this:
    (Gestion Econ�mica o Facturaci
    If I log on to the AIX server where the oracle database in question is and run sqlplus from there, I see things properly. I also managed to regedit oracle home to get sql plus on my windows machine to display this properly. I still cannot get sql developer to work though...
    Details about sql developer:
    font: arial Unicode MS
    environment encoding: UTF-8
    NLS Lang: American
    NLS Territory: America
    windows regional options:
    English (United States)
    Location: United States
    Database NLS settings:
    NLS_LANGUAGE     AMERICAN
    NLS_TERRITORY     AMERICA
    NLS_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     mm/dd/yyyy hh24:mi:ss
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_CHARACTERSET     UTF8
    NLS_SORT     BINARY
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY     $
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    Any ideas on how I can fix this. I'd rather NOT log onto the server to run queries.... thanks in advance for your thoughts!
    Edited by: user10939448 on Jan 31, 2012 1:51 PM

    user10939448 wrote:
    This problem is quite strange in that when I've been able to manually set American_america.utf8, things work.Sorry to say, but it seems you may have an incorrect setup.
    In general, you should set char set part of NLS_LANG to let Oracle know the code page used by the client. With win-1252, NLS_LANG should include .WE8MSWIN1252.
    The display from sqlplus was "lying", due to incorrectly stored data coupled by incorrect nls_lang setting (char set part). The pass-through or gigo scenario can be dangerous this way. Search the Globalization forum for the term 'pass-through' for previous discussions on the theme.
    The setting on AIX servers may be incorrect as well, but it depends how you use it (e.g. for database export or data load with utf-8 encoded files it may be correct).
    The output of the query you recommended looks odd to me:
    (Gestion Econ�mica o Facturaci     Typ=1 Len=30 CharacterSet=UTF8:
    28,47,65,73,74,69,6f,6e,20,45,63,6f,6e,f3,6d,69,63,61,20,6f,20,46,61,63,74,75,72,61,63,69;This is the telling part. The 0xF3 is not legal in UTF8. Actually, the code units for ó, U+00F3 Latin small letter o with acute, are C3 B3. So instead of f3 you should have expected c3,b3 from the dump output.
    >
    So it looks like what's under the covers is correct, but I'm still not seeing the correct character in sql developer.The opposite is true. Data is incorrectly stored and SQL Developer is correctly showing you this. Sqlplus is not the best tool in Unicode environments, SQL Developer is better.
    >
    ACP according to my windows registry is 1252. OEMCP is 437Also, if you use database clients in console mode (such as sqlplus), NLS_LANG should include .US8PC437 to properly indicate that code page in use is 437.

  • Need to find out extended ASCII characters in database

    Hi All,
    I am looking for a query that can fetch list of all tables and columns where there is a extended ASCII character (from 128 to 256). Can any one help me?
    Regards
    Yadala

    yadala wrote:
    Hi All,
    I am looking for a query that can fetch list of all tables and columns where there is a extended ASCII character (from 128 to 256). Can any one help me?
    Regards
    YadalaThis should match your requirement:
    select t.TABLE_NAME, t.COLUMN_NAME from ALL_TAB_COLUMNS t
    where length(asciistr(t.TABLE_NAME))!=length(t.TABLE_NAME) 
    or length(asciistr(t.COLUMN_NAME))!=length(t.COLUMN_NAME);The ASCIISTR function returns an ASCII version of the string in the database character set.
    Non-ASCII characters are converted to the form \xxxx, where xxxx represents a UTF-16 code unit.
    The CHR function is the opposite of the ASCII function. It returns the character based on the NUMBER code.
    ASCII code 174
    SQL> select CHR(174) from dual;
    CHR(174)
    Ž
    SQL> select ASCII(CHR(174)) from dual;
    ASCII(CHR(174))
                174
    SQL> select ASCIISTR(CHR(174)) from dual;
    ASCIISTR(CHR(174))
    \017DASCII code 74
    SQL> select CHR(74) from dual;
    CHR(74)
    J
    SQL> select ASCII(CHR(74)) from dual;
    ASCII(CHR(74))
                74
    SQL> select ASCIISTR(CHR(74)) from dual;
    ASCIISTR(CHR(74))
    J

  • Extended ASCII

    We are using JDBCTemplate (Spring) with MySQL as database and AES Encryption technique.
    The data in extended ASCII is saved correctly. But when we retrived the data, in the resultset the data is reterived correctly. However when we display the resultset it places question-mark (?) to the extended ASCII.
    Why is it does not display the right extended ASCII charecters?
    Thanking you in advance

    Well I don't understand. The character that I am
    using are �����You see you can easily see and type them. Then how
    come they are "UTF-8"Please adviceBased on your responses in this thread and in http://forum.java.sun.com/thread.jspa?threadID=5176938&messageID=9689678#9689678 I don't think you have a good enough knowledge of Java or cryptography to take this forward. I suggest you spend some time reading about Java and the JCE and experimenting with it before writing another line of production code.

  • Would like to use/see extended ascii characters in...

    I've got an E72 and I love it, but I would like to be able to see and use extended ascii characters.  Here is an example: σ__σ .  It looks like an upside-down, mirror-image capital Q on either side of the regular underline character.  To get the character I use ALT-229 on my Windows keyboard.  I can type this into my sms's or emails using ctrl-229, but it looks like a small "a" with a little "u" over it.  It looks the same way when it gets to my Windows email, so the character is not being sent properly from my E72.
    Am I just using the wrong ascii code?  Help!

    I did a little testing.
    SMS:
    when I create a text message to send to myself as a test, I can use ctrl-963 and on my original text message it looks like the lower case sigma, the character I want.
    When I get the text message, the character looks like an upper case sigma (the "M" on its side).
    The character is not supported at all in the regular Nokia Messaging app.
    EMAIL:
    When I attempt to use the character in creating a message, it just gives me a question mark character.
    When I get an email with the character, again it just gives me a question mark character.
    It appears that this is indeed a matter of software.  I-sms will support showing me that character, but not receiving it.  Profimail (the mail app I am using) doesn't support it either way.
    This isn't critical.  I will keep it in the back of my mind when evaluating this kind of app, and try suggesting to the programmers of both apps that supporting the extended character set would be handy, particularly in text messaging.

  • Reg Extended Ascii Characters...

    Hi,
    I have state name data with Ascii extended characters, the examples of which are given below:
    Bouches-du-Rhône
    Corrèze
    Côte-d''Or
    Côtes-d''Armor
    Finistère
    Hérault
    Isère
    Lozère
    Nièvre
    Puy-de-Dôme
    Pyrénées-Atlantiques
    Pyrénées (Hautes)
    Pyrénées-Orientales
    Rhône
    Saône (Haute)
    Saône-et-Loire
    Sèvres (Deux)
    VendéeI need to :
    1) insert these data in a table.. i think i have to use ASCII codes for it or is it any other way?
    2) How will a user be able to search the above states.. I mean what will be the behaviour of above states when searched with LIKE operator or = search...?
    3) will indexes on state column be used in the above cases..?
    4) any other things that i need to keep in mind while working with such data..
    Thx

    What is your database character set?
    What application(s) will you be using to modify the data?
    What are the NLS_LANG settings on the client machine(s)?
    Assuming that the database character set supports the characters in the first place, and that the client supports them, they should behave just like any other character. Searching, indexing, etc. will all continue to work as normal.
    Justin

  • Convert from char to ASCII code

    anyone can advice me on this program why the conversion cannot be done? Thank in advance.
    String charInput = JOptionPane.showInputDialog (null, "Enter a character", "Finding ASCII code", JOptionPane.QUESTION_MESSAGE) ;
    answer = Integer.parseInt (charInput) ;

    Try this code out:
    import javax.swing.JOptionPane;
    public class Crap {
        public static void main (String[] args) {
            String charInput =
                    JOptionPane.showInputDialog (null,
                    "Enter a character", "Finding ASCII code",
                    JOptionPane.QUESTION_MESSAGE) ;
            JOptionPane.showMessageDialog (null, charInput, "Collected Data",
                    JOptionPane.INFORMATION_MESSAGE );
    //        answer = Integer.parseInt (charInput) ; //<-- What datatype?
            String answer = "You never declare the data type for you answer.\n" +
                    "JOptionPane returns a string of what the user enters.\n" +
                    "The first?  The last? Some other position?\n" +
                    "A String != a character.\n" +
                    "Which character of the string do you want to convert?\n" +
                    "You need to do a lot more work on this problem.";
            JOptionPane.showMessageDialog (null, answer,
                    "The Java Compiler hates your code because...",
                    JOptionPane.OK_OPTION, null);
    }http://leepoint.net/notes-java/GUI/containers/20dialogs/10joptionpane.html
    Cheers !
    JJ

  • Convert char to ascii code and vice versa

    HI
    Is there any function module to convert char to ascii code and vice versa.
    Thanks in advance

    Hi,
    be careful if you have unicode running in your system. URL_ASCII_CODE_GET is platform-dependent so it will return the internal HERX representation of the character in your system - which is hopefully and in most cases ASCII.
    Under unicode, we use double-byte characters here. I tried this function and the result CHAR_CODE is '00' regardless what character I specify for TRANS_CHAR. But the coding is so simple I corrected resultig in this sample code:
    [P]
    convert p_form to ASCII (internal) representation
      DATA:
        l_ofs TYPE syfdpos,
        l_len TYPE sy-linsz,
        l_ascii TYPE i.
      FIELD-SYMBOLS:
        <x> TYPE x.
      l_len = STRLEN( p_ascii ).
      DO l_len TIMES.
        l_ofs = sy-index - 1.
        ASSIGN p_ascii+l_ofs(1) TO <x> CASTING.
        l_ascii = <x>.
        WRITE: l_ascii.
      ENDDO.
    [/P]
    Here, for each character of string p_ascii, the internal (ASCII) representation is determined and written to the output list.
    Regards,
    Clemens

  • How to send an attached file containing with non-ascii code ?

    Hi,
    I want to send a attaced text file containing with non-ascii code(Traditional Chinese). Is there any way to solve the encoding problem?
    Currently, it transfer into non-meaningful code in receiving side.
    Thanks for the help in advance.

    Here is the code:
    Session _gSession = null;
    MimeMessage message = null;
    Properties props = new Properties();
    props.put("mail.smtp.host", smtpHost);
    _gSession = javax.mail.Session.getInstance(props, null);
    message = new MimeMessage(_gSession);
    message.setFrom(new InternetAddress(emailSender , emailSender));
    InternetAddress ia[] = new InternetAddress[1];
    ia[0] = new InternetAddress(emailReceiver, emailReceiver);
    message.setRecipients(Message.RecipientType.TO, ia);
    message.setSubject("Test Encoding Attached File");
    message.saveChanges();
    BodyPart messageBodyPart = new MimeBodyPart();
    DataSource fds = new FileDataSource("Big5_Code.txt");
    messageBodyPart.setDataHandler(new DataHandler(fds));
    messageBodyPart.addHeader("Content-ID","meme");
    MimeMultipart multipart = new MimeMultipart("related");
    multipart.addBodyPart(messageBodyPart);
    message.setContent(multipart);
    transport.connect();
    transport.send(message);

  • How can I get the ASCII code instead of Unicode?

    If I use getNumericValue to return the Unicode of a character, I found out "a" = "A". Is there any way I can find out the different code for capital letter and small letter? I'm thinking about ASCII code, any suggestion for which method to return the ASCII code?

    That is not what getNumericValue does. (Try getNumericValue('*'), for example, and you will see it returns -1.) If you want to find the Unicode value of a character, simply cast the character to an int:char letter = 'A';
    int unicodeValue = (int)letter;If the character you chose was in the ASCII character set, you will automatically have its ASCII code, because ASCII is simply the first 128 characters in the Unicode character set.

  • ASCII Code in ABAP

    Hi Experts,
    We need to enter a unique ASCII character called 'US' or Unit Separator in a text file being generated through a program.
    The ASCII code for US is 31. However when we try and do it programmatically the character '#' is getting populated.
    The code is as follows:
    DATA : lv_sep type c.
    field-symbols : <xfs> type x.
    assign lv_sep to <xfs> casting.
    <xfs> = 0031.
    write lv_sep.
    Kindly help us out.
    Thanks and Regards,
    Ravi Bhatnagar

    Hi,
    This character is special one, so you can't print it out. In SAP all special charcter which can't be printed are replaced with placeholder #.  They are intended to do theri special purpose in flat file, once you open it.
    Do the following:
    - use fm HR_KR_XSTRING_TO_STRING to convert xstring with value  '1F' (30 decimal value) to string
    - write this string to certain place in internal string table (where you want later use it in the file)
    - download this table as to file
    - special character will do its purpose in text file
    This is the same functionality as you would be placing Line Feed (0x0A - 10 dec). It would be shown as # but once you open downlaoded file you don't see hash # anymore, but you see that new line in that place.
    Hope this is clear
    Regards
    Marcin

  • Display extended ascii characters as question mark in xml file

    I am creating a XML file with encoding as UTF-8. Some tag values contain some extended ascii characters. When i run the java program to create the file in windows, the extended ascii characters are display correctly. But in linux it is displaying as ?(question mark).
    i am not able to rectify this. can anyone help me....
    Its urgent
    Thanks in advance.
    Message was edited by:
    Rosy_Thomas@Java

    Probably the locale is not set for the shell you are running in. The default 'C' locale uses the ASCII encoding which defines only 128 characters. See if giving the commandexport LC_CTYPE=en_US.UTF-8before starting the program fixes the issue.

Maybe you are looking for

  • IPod Touch G1 doesn't start after update

    I manually updated a friend's iPod from 1.1.? to 2.2.1 using the "Shift/Options + click Restore" method, but when the update started I briefly got the "Connect to iTunes" picture with a tiny white line across the screen. The screen went white and iTu

  • ITunes not Syncing

    It used to work! I sync my music to my iPhone from my iMac. I Sync my contacts and calendar from my PC. My music does not update from the iMac... it used to! My contacts and appointments update properly from my PC! When I plug in and Sync with the iM

  • JVM 1.4.2_b28 crash on windows

    I am running an application on a windows 2000 server. We recently upgraded from 1.3.1 to 1.4.2_b28 (hotspot server). In 1.3.1 it ran fine, under 1.4.2_b28 it is crashing about every 36 hours. We are running the application as a service and do not get

  • Big disk problems - or big-disk problems?

    Hi there! I have really big problems. I try to set up a 45 GB Western Digital Caviar 450AA (secondary IDE controller, master-drive). I patched my machine with the recommended patch cluster which also contains patch no. 110202-01 for the ata-drivers.

  • Remove Characters from a Date

    What are some ways that I could remove the hyphens, semicolons, periods, and empty strings from a date (in a single expression)? If I have a date (returned from GETDATE()) as follows: 2014-09-15 16:53:09.253 I want to remove the non-numeric character