Character to uni-code manipulation

I'm trying to take a character to uni-code and perform some manipulations, however I am having problems converting uni-code back into a string. I've found the GetNumeric Value but cannot find the corresponding method to convert it back.
public static void main(String[] argC)
Person aPerson = new Person();
Character aCharacter;
int anInt = Character.getNumericValue('b');
System.out.println(anInt);
anInt++;
char aTempCar = anInt;
     aCharacter = new Character(aTempCar);
     System.out.println(Character.getNumericValue(aTempCar));
     System.out.println (aCharacter.toString());
}

You can convert a char to the unicode code point by casting to int. Most of the time the cast is implicit and doesn't need to be written.char character = 'b';
int codepoint = character; // = 98Similarly a code point can be converted to a char by casting but this time the casting is necessary:int codepoint = 98;
char character = (char) codepoint;You should remember that not all code points can be represented with a single char so simply casting does not give you the correct value with every code point. The [url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html#toChars(int)]Character.toChars(int) method can be used to convert a code point to characters (starting with version 1.5).
The getNumericValue() method returns you the numeric value of a character, e.g. the numeric value of '5' is 5 and the numeric value of the roman numeral 'X' is 10. It does not return the unicode code point of a character.

Similar Messages

  • Syntax errors while migrating from non- unicode to Uni code

    What are the syntax errors while migrating from non unicode to Uni code

    Hi Sudheer,
    u can get the information related to errors while migrating from non- unicode to Uni code from the below...pls go through...
    Note 765475 - Unicode Conversion: Troubleshooting
    these are the notes related to the issues of migration form non unicode to ounicode.
    Related Notes
    986907 - SQL Server settings for R3load based system copy
    954001 - Error fix: ILLEGAL_SUBSTRING_MODIFICATION in SUMG
    936441 - Oracle settings for R3load based system copy
    928909 - Repair table data in SUMG in Unicode systems
    895804 - Problematic rows in table DMEE_TREE_NODE
    895560 - Support for languages only available in Unicode system
    885441 - Common Migration Errors
    842788 - DB Multiconnect: Unicode Migration
    837173 - RADCUCNT in Unicode Conversion: Collective Note
    756534 - Automatic Assignment of Languages with Character Statistics
    753334 - Unicode Conversion: Problem in Japanese device types
    726954 - Private Use Areas in Unicode Systems
    722193 - RFC legacy non-Unicode clients and Unicode servers
    718329 - R3load terminates the export during a Unicode conversion
    695196 - Error in the export for Unicode migration
    672835 - Textflags could cause problems during Unicode conversion
    627764 - Unicode migration: table pools inconsistent after conversion
    614550 - Troubleshooting BC-I18
    587896 - Add. info on upgrade to SAP R/3 Enterprise Core 4.70 SR1
    573044 - Unicode conversion for HR application
    480671 - The Text Language Flag of LANG Fields
    379940 - Unicode based mySAP availability
    79991 - Multi-Language and Unicode support of SAP applications
    73606 - Supported Languages and Code Pages
    42305 - RSCPINST (I18N configuration tool)
    regards,
    rudra..
    Assign points if helpful

  • How to activate uni code check in function pool.

    hi experts,
    how to activate uni code check in function pool.
    pls give needy
    regards,
    praveen

    hi praveen,
    for every report we can check unicode flag in the attributes.
    function pool is also a type report.
    for classes it is not possible to enable directly.
    for this we have TCODE UCCHECK.
    enable it by using above.

  • RFC FM call problem uni-code to non-unicode?

    Hi SDN,
    I am calling RFC fun. module from non-unicode system to a uni-code system.
    i am calling this FM from various systems is there any way in target system to know whether the call is from uni-code system or non-unicode system.
    Regards,
    Rahul.

    Hi,
    I think it is not possible for the reason that an RFC function module can be called from not only an SAP system but also from any non-SAP system like a J2EE Application in which case it does not make sense to know if the calling system in unicode or not.
    But still check with the SYST structure in SE11 if there is any system field.
    Regards,
    Sesh

  • Program send from uni code system to XI

    I will send data from uni-code system to XI system
    but I need to sent using non-unicode mode (setting RFC)
    But I have a problem when I sent data กรกช Data will determin in SAP XI as "####" how can I do?
    Best REgards,
    @tom

    please read the rule of engagement dont raise multiple thread.
    with non unicode RFC setting in R3 is not possible as said in another thread.
    chirag

  • Getting error Uni code check when modifying Ztable from work area?

    Hi all,
    Getting error Uni code check when modifying Ztable from work area?
    and how to increment counter when data modified?
    FM 'popup_to_confirm'.
    IMPORTING
           answer                      = RES.
    CHECK
          RES = '1'.
            WRITE :/ 'UPDATE'.
          MODIFY ZPPT_PPDPLAN FROM GWA_FIN_PROD.
    thanks in advance..

    what error you are getting. make sure source and Target are of similar sturcture.

  • How to import Symbocic  Character in Items Code through DTW

    Dear all
    My client maintained their Item code as Alphanumeric with Symbolic character example-(Item Code Like 375-1802041-Б2, 375-1802041-2u03A0, 375-1802041-Б2, 375-1802041-Ж and 375-1802041-я).
    The problem is when I import this codes through DTW using CSV format the all Symbolic character are automatically convert  to u2018?u2019 and the Data import was failed the message show u201C invalid Item Codeu201D.
    Then how to import this item codes in SAP B1 through DTW.
    Please help me to solve above problem.
    Thanks
    Subhas Pal

    It is better if you just use standard ASCII characters for Item Code.  Think about website address, will you use those special characters?
    You may try to put those special codes to part of item description field if you can.
    To replace those symbols, you may use number to get one-to-one mapping. Such as Ж = 16, Я = 42
    Thanks,
    Gordon

  • Byte Code Manipulation vs. Preprocessor

    Hello,
    I'm not sure if I'm asking this in the right forum or not, but if I'm not, please let me know and I'll change it asap.
    I�d like to know what the advantages associated with byte code manipulation are.
    For instance, if one had the option, why wouldn�t anyone prefer to use traditional pre-processor methods of altering java code as oppose to byte code manipulation (ie. with javassist or ASM)? -- in respects to porting J2ME apps over a variety of cellphones.
    Thanks,
    Mark

    see I was just trying to use BCEL to learn about it. I
    want to manipulate the class files. So no point comes
    of a different solution.Why nobody is giving me the
    solution that I want...Is it b'coz its not possible
    with BCEL or what....Please help...
    Kindly and please give the replay based on the BCEL.
    Thanking you,Initially, you stated that your problem was how to debug production code that may or may not have debugging code present - to which you have been given an answer. If, however, your goal is a purely academic exercise (this has all the earmarks of one, especially since this won't do one bit of good in real life) then you are perhaps misunderstanding what BCEL is. You can't insert System.out.println(...) statements with it, since those are uncompiled java source lines - instead you need to insert compiled bytecode instructions, which will look more like this:
      34 invokevirtual #9 <Method java.lang.String getQuery()>
      37 invokevirtual #7 <Method void println(java.lang.String)>
      40 getstatic #5 <Field java.io.PrintStream out>which I wouldn't think is very useful. I can't suggest strongly enough that you consider not running a binary classfile mutating application on production code - that is a very bad idea.
    As I see it, you have two options: compile two different binaries, one for debug and one for release; or use a flexible logging system (which I have done in every case). A third option of course is to continue playing around with BCEL for the purpose of learning the java bytecode world (but if you really want to do that, I suggest you write your own classfile disassembler using the Sun VM spec - it isn't as hard as you think and extremely educational) - but don't inflict a production application with a poor design simply to satisfy a whim.

  • Making Z Function Modules uni code complaint

    Hi ,
    we are in the process of upgrade to ECC 6.0 and the ABAP programs are have been made uni code complaint
    but the Function modules still have uni -code errors they are uni code active so is there a solution whereby we can do so

    Raghav,
    For Function Modules, the corresponding Programs are their Function Groups.
    So the Program names start with SAPL followed by the Funciton Group name Zxxxxxxx.
    Check the programs for Unicode compatability as the same way it has been done for Custom Programs.
    OR
    SE37
    Function Module Zxxxxxxxxxx
    Click 'Display'.
    Select 'Attributes'.
    Program Name : SAPLZxxxxxxx
    Check the programs for Unicode compatability as the same way it has been done for Custom Programs.
    Regards,
    Bobby

  • How can I alternate character colors with code CS3 JS-need for eye excersize?!

    For an interesting attempt to train eye focusing, I need to write code or find a tip to color every other character in any given file.
    Still an amatuer in Scripting.
    ST

    Select a text frame and run the script. Don't choose a frame with great number of characters if you don't want to wait until tomorrow morning.
    var myDocument = app.activeDocument;
    var myColorCounter = 0;
    var myColors = [];
    var myColorsValues  = [
                          [100, 0, 0, 0],
                          [80, 0, 100, 0],
                          [0, 0, 100, 0],
                          [100, 60, 0, 0],
                          [0, 100, 100, 0],
                          [60, 100, 0, 0],
                          [0, 44, 96, 0]
    CheckSwatches();
    // Select a text frame
    var myTextFrame = myDocument.selection[0];
    var myCharacters = myTextFrame.characters;
    for (i = 0; i < myCharacters.length; i++) {
        myCharacters[i].fillColor = myColors[myColorCounter]
        ResetSwatches();
    ResetSwatches();
    function CheckSwatches() {
        for (i=0; i<myColorsValues.length; i++)  {
            var myCurArray = myColorsValues[i];
            var myColorName = "C=" + myCurArray[0] + " M=" + myCurArray[1] +  " Y=" + myCurArray[2] + " K=" + myCurArray[3];
            if (myDocument.swatches.item(myColorName) == null){
                var myCurColor = myDocument.colors.add({colorValue:myCurArray, name:myColorName});
                myColors.push(myCurColor);
            else {
                myColors.push(myDocument.colors.item(myColorName));
    function ResetSwatches() {
        if (myColorCounter < myColorsValues.length-1) {
            myColorCounter++;
        else {
            myColorCounter = 0;

  • Retrieve the character from hex code

    I want to write the hex code / ASCII code of the English alphabets ( A - Z and a - z ) in a file and again want to read those codes (either ASCII or Hex code) from the file to retrieve the characters from them. How it is possible?
    For example, ASCII code of 'A' is 65 and hex code is 41.
    ASCII code of 'z' is 122 and hex code is 7A.
    Avijit

    Forgot that you need to convert them back:
            Character c = new Character('A');
            System.out.println("char : "+c);
            int ascii = (int) c.charValue();
            System.out.println("ascii: "+ascii+" => "+(char) ascii);
            String hex = Integer.toHexString(ascii);
            System.out.println("hex  : "+hex +" => "+(char) Integer.parseInt(hex, 16));

  • Migration from SQL7.0 To Oracle & Uni-code Characters

    Hi..
    I faced one problem in migration from SQL7.0 to Oracle using
    Workbench, which is that all Arabic characters is comming
    question marks after the migration.
    So does Oracle Workbench supports two_byte code for internationl
    languages..
    null

    Hi Khalil,
    Can you please e-mail [email protected] with answers to the
    following questions. We will try and investigate this.
    What is the structure of the SQL Server table?
    What is the structure of the Oracle table?
    Also, what character set did you create the Oracle database with?
    What codepage was the SQL Server database?
    Are the characters appearing as question marks in an application?
    Regards
    John
    Khalil A. Khalil (guest) wrote:
    : Hi..
    : I faced one problem in migration from SQL7.0 to Oracle using
    : Workbench, which is that all Arabic characters is comming
    : question marks after the migration.
    : So does Oracle Workbench supports two_byte code for
    internationl
    : languages..
    Oracle Technology Network
    http://technet.oracle.com
    null

  • What is uni code , please tell me

    hi experts,
    please tell me use of unit code.
    thanks
    subhasis

    Dear Subhasis,
    Unicode provides a unique number for every character irrespective of the platform, the program, the language.
    Primarily, computers just deal with numbers. They store letters and other characters by assigning a number for each one. Before Unicode was invented, there were hundreds of different encoding systems for assigning these numbers. No single encoding could contain enough characters: for example, the European Union alone requires several different encodings to cover all its languages. Even for a single language like English no single encoding was adequate for all the letters, punctuation, and technical symbols in common use.
    These encoding systems also conflict with one another. That is, two encodings can use the same number for two different characters, or use different numbers for the same character. Any given computer (especially servers) needs to support many different encodings; yet whenever data is passed between different encodings or platforms, that data always runs the risk of corruption.
    Unicode is changing all that!
    Unicode provides a unique number for every character, no matter what the platform, no matter what the program, no matter what the language. The Unicode Standard has been adopted by such industry leaders as Apple, HP, IBM, JustSystem, Microsoft, Oracle, SAP, Sun, Sybase, Unisys and many others. Unicode is required by modern standards such as XML, Java, ECMAScript (JavaScript), LDAP, CORBA 3.0, WML, etc., and is the official way to implement ISO/IEC 10646. It is supported in many operating systems, all modern browsers, and many other products. The emergence of the Unicode Standard, and the availability of tools supporting it, is among the most significant recent global software technology trends.
    Incorporating Unicode into client-server or multi-tiered applications and websites offers significant cost savings over the use of legacy character sets. Unicode enables a single software product or a single website to be targeted across multiple platforms, languages and countries without re-engineering. It allows data to be transported through many different systems without corruption.
    About the Unicode Consortium
    The Unicode Consortium is a non-profit organization founded to develop, extend and promote use of the Unicode Standard, which specifies the representation of text in modern software products and standards. The membership of the consortium represents a broad spectrum of corporations and organizations in the computer and information processing industry.
    Hope this helps you.
    Do award points if you found them useful.
    Regards,
    Rakesh

  • Regarding Conversion Of ABAP program from non unicode to uni code

    Hi Can you please let me know the procedure for converssion of non unicode to unicode?
    Thanks in advance,
    zubera

    Hi
    The Link will be helpful to you.
    Re: Upgrade 4.6 to ECC - What are the responsibilites
    regarding Unicode influence in Standard programs
    Very good document:
    http://www.doag.org/pub/docs/sig/sap/2004-03/Buhlinger_Maxi_Version.pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d37d1ad9-0b01-0010-ed9f-bc3222312dd8
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/589d18d9-0b01-0010-ac8a-8a22852061a2
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f8e316d9-0b01-0010-8e95-829a58c1511a
    You need to use the transaction UCCHECK.
    The report documentation is here
    ABAP Unicode Scan Tool UCCHECK
    You can use transaction UCCHECK to examine a Unicode program set for syntax errors without having to set the program attribute "Unicode checks active" for every individual program. From the list of Unicode syntax errors, you can go directly to the affected programs and remove the errors. It is also possible to automatically create transport requests and set the Unicode program attribute for a program set.
    Some application-specific checks, which draw your attention to program points that are not Unicode-compatible, are also integrated.
    Selection of Objects:
    The program objects can be selected according to object name, object type, author (TADIR), package, and original system. For the Unicode syntax check, only object types for which an independent syntax check can be carried out are appropriate. The following object types are possibilities:
    PROG Report
    CLAS Class
    FUGR Function groups
    FUGX Function group (with customer include, customer area)
    FUGS Function group (with customer include, SAP area)
    LDBA Logical Database
    CNTX Context
    TYPE Type pool
    INTF Interface
    Only Examine Programs with Non-Activated Unicode Flag
    By default, the system only displays program objects that have not yet set the Unicode attribute. If you want to use UCCHECK to process program objects that have already set the attribute, you can deactivate this option.
    Only Objects with TADIR Entry
    By default, the system only displays program objects with a TADIR entry. If you want to examine programs that don't have a TADIR entry, for example locally generated programs without a package, you can deactivate this option.
    Exclude Packages $*
    By default, the system does not display program objects that are in a local, non-transportable package. If you want to examine programs that are in such a package, you can deactivate this option.
    Display Modified SAP Programs Also
    By default, SAP programs are not checked in customer systems. If you also want to check SAP programs that were modified in a customer system (see transaction SE95), you can activate this option.
    Maximum Number of Programs:
    To avoid timeouts or unexpectedly long waiting times, the maximum number of program objects is preset to 50. If you want to examine more objects, you must increase the maximum number or run a SAMT scan (general program set processing). The latter also has the advantage that the data is stored persistently. Proceed as follows:
    - Call transaction SAMT
    - Create task with program RSUNISCAN_FINAL, subroutine SAMT_SEARCH
    For further information refer to documentation for transaction SAMT.
    Displaying Points that Cannot Be Analyzed Statically
    If you choose this option, you get an overview of the program points, where a static check for Unicode syntax errors is not possible. This can be the case if, for example, parameters or field symbols are not typed or you are accessing a field or structure with variable length/offset. At these points the system only tests at runtime whether the code is sufficient for the stricter Unicode tests. If possible, you should assign types to the variables used, otherwise you must check runtime behavior after the Unicode attribute has been set.
    To be able to differentiate between your own and foreign code (for example when using standard includes or generated includes), there is a selection option for the includes to be displayed. By default, the system excludes the standard includes of the view maintenance LSVIM* from the display, because they cause a large number of messages that are not relevant for the Unicode conversion. It is recommended that you also exclude the generated function group-specific includes of the view maintenance (usually L<function group name>F00 and L<function group name>I00) from the display.
    Similarly to the process in the extended syntax check, you can hide the warning using the pseudo comment ("#EC *).
    Applikation-Specific Checks
    These checks indicate program points that represent a public interface but are not Unicode-compatible. Under Unicode, the corresponding interfaces change according to the referenced documentation and must be adapted appropriately.
    View Maintenance
    Parts of the view maintenance generated in older releases are not Unicode-compatible. The relevant parts can be regenerated with a service report.
    UPLOAD/DOWNLOAD
    The function modules UPLOAD, DOWNLOAD or WS_UPLOAD and WS_DOWNLOAD are obsolete and cannot run under Unicode. Refer to the documentation for these modules to find out which routines serve as replacements.
    Regards
    Anji

  • Effects of Uni-code activation in SAP 4.6C(Arabic)

    Like to know the effects of activating Unicode in SAP 4.6 C(Arabic language is used in our system).

    Again: Switching a whole system to Unicode isnt just to "switch it on". You have to prepare your abap code, build up a sandbox, examine every interface you have.
    There is no switch. Its a process which will take a mimunum of 3 month in preparation.

Maybe you are looking for