Storing chinese character in Oracle8i

Hi Sir,
How to use Oracle8i database to store chinese character?
Is there any setting on database side?
I'm using Oracle8i 8.1.5 currently.
Please advise.
Thanks.

it's not the field type, it's the character encoding you need to change. Generally, you should make sure that the DB uses UTF-8 encoding for storage, the DB connector uses UTF-8 (although probably if the DB does), set the content type for the page to "text/html; charset=UTF-8" and when you process forms, call request.setCharacterEncoding("UTF-8") before doing any getParameter calls.

Similar Messages

  • Retrieve the unicode from a chinese character stored in MS Access database

    Hi,
    I have a table in MS Access database with chinese character. When I read it from my sql queries I get the "?" instead of the chinese character. When I calculate the unicode I get the 003F which is the unicode for the questionmark. How do I get the correct unicode of the chinese character?
    Connection conn = DriverManager.getConnection("jdbc:odbc:myDB"); Statement stmt = conn.createStatement(); String sqlString = "SELECT Char FROM MyTable WHERE id=2"; ResultSet rs = stmt.executeQuery(sqlString); String s1 = rs.getString("Char");    // the s1 is the ? instead of the chinese character. byte[] b = s1.getBytes(Charset.forName("UTF-16")); int firstByte = 0; short anUnsignedByte = 0; String unicode = ""; for(int  n = 0; n < b.length; n++){     String temp = "";     firstByte = (0x000000FF & ((int)b[n]));     anUnsignedByte = (short)firstByte;     temp = Integer.toHexString(anUnsignedByte);     if(temp.length() == 1){ temp = "0" + temp;     }     unicode = unicode + temp; } unicode = unicode.substring(4); System.out.println("unicode: " + unicode);  //Here I get the unicode, 003f, for the question mark.

    Apparently getString() is already applying the wrong encoding to the bytes which are in the data, so you can't do anything with what it returns. (This isn't surprising since it's Access you are asking about.) I suggest using the getObject() method and see what it returns. If it returns the same string then you are out of luck. But maybe you'll get lucky and it will return an array of bytes containing the correct data. Don't get too hopeful though.

  • Storing chinese in client odb from java application

    Hi all,
    first i like to thank Greg Rekounas for his wonderful support and contribution....
    This is my server setup.
    os-windows 2000 sp4
    db-oracle 9ir2 (unicode with AL32UTF8 charset)
    lite-oracle10g r2 (with latest patchset)
    nls_lang- AMERICAN_AMERICA.AL32UTF8
    storing and retriving chinese in oracle 9i database from isql*plus works.
    lite configuration.
    1. In $OLITE_HOME\mobile_oc4j\j2ee\mobileserver\applications
    \mobileserver\setup\common\webtogo\webtogo.ora file edited the JAVA_OPTION
    to:
    JAVA_OPTION=-Djava.compiler=NONE -Dfile.encoding=UTF8
    2. In $OLITE_HOME\mobile_oc4j\j2ee\mobileserver\applications
    \mobileserver\setup\dmc\common\win32.inf file, added the following:
    a. In the <file> section, added the following:
    <item>
    <src>/common/win32/olilUTF8.dll</src>
    <des>$APP_DIR$\bin\olilUTF8.dll</des>
    </item>
    b. In the <ini> section, added the following:
    <item name='POLITE.INI' section='All Databases'>
    <item name="DB_CHAR_ENCODING">UTF8</item>
    </item>
    <item name='POLITE.INI' section='SYNC'>
    <item name="DB_ENCODING">UTF8</item>
    </item>
    published the application developed in java using packaging wizard.
    downloaded the client in the pc with the following config:
    windows 2000 (english)
    nls - default.
    installed chinese language support.
    tried to access 9i database from isql*plus and stored & viewed chinese characters sucessfully.
    tried to store a chinese character from java application in the client odb -- failed.
    values are getting inserted from the application but when i view them back it shows & # 2 6 0 8 5 ; (i have included a space in between all 8 characters.
    but when i copy this no and paste in msword it shows 日(chinese character)
    i dont know the exact reason for the above scenerio...................
    Also please help me on this too.......
    why can i store & view chinese characters sucessfully in isql*plus from the client machine while i cannot do the same on client odb from java application even though the lite config are done to support utf8?
    is anything i left out?
    should i do any codes changes in java?(java application is of verision jdk1.4_13)
    Thanks,
    Ashok kumar.G

    Sorry for late replay!! in the SharePoint server both the Claim based and Classic mode is enabled in the server, but still I want to get authenticated via Classic mode just like it happens in SharePoint  2007 and 2010, so do i have to use a different
    set of classes to do that if yes can you please tell me those ?

  • Chinese Character cannot be decoded

    hi,
    I would like to implement two JSP pages. The first JSP is just a html form, which is used to submit unicoded chinese data to a target JSP file.
    The target JSP file received those data and display.
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> is added in the first JSP file. As a result, data will be submitted in UTF-8 format.
    In target JSP, I used the following code to recieve and decode data:
    <%@ page contentType="text/html; charset=UTF-8" %>
    <%
    String para = request.getParameter("para"); // where para is name of received parameter
    byte[] bytes = para.getBytes();
    para = new String(bytes, "UTF-8");
    out.println("Recieved character: " + para);
    %>
    My Problem:
    After I submitted chinese characters from the first JSP file, only some of them can be displayed on target JSP. Some of those characters are missing.
    For example, when I input "�@", target JSP can display the character. On the other hand, when I input "�p", nothing is displayed. But I know that variable "bytes" stored 3 bytes for each chinese character. I would like ask why
    para = new String(bytes, "UTF-8");
    cannot encode properly. Is anything wrong about my coding?
    Thx

    More information can be provided.
    OS: Windows 2000 server
    web server: iPlanet
    P.S. : I have set the Character set to UTF-8 in iPlanet.
    thx.
    hi,
    I would like to implement two JSP pages. The
    The first JSP is just a html form, which is used to
    submit unicoded chinese data to a target JSP file.
    The target JSP file received those data and
    and display.
    <meta http-equiv="Content-Type"
    ype" content="text/html; charset=UTF-8"> is added in
    the first JSP file. As a result, data will be
    submitted in UTF-8 format.
    In target JSP, I used the following code to
    to recieve and decode data:
    <%@ page contentType="text/html; charset=UTF-8"
    F-8" %>
    <%
    String para = request.getParameter("para"); //
    // where para is name of received parameter
    byte[] bytes = para.getBytes();
    para = new String(bytes, "UTF-8");
    out.println("Recieved character: " + para);
    %>
    My Problem:
    After I submitted chinese characters from the
    m the first JSP file, only some of them can be
    displayed on target JSP. Some of those characters are
    missing.
    For example, when I input "�@", target JSP can
    P can display the character. On the other hand, when I
    input "�p", nothing is displayed. But I know that
    variable "bytes" stored 3 bytes for each chinese
    character. I would like ask why
    para = new String(bytes, "UTF-8");
    cannot encode properly. Is anything wrong about my
    coding?
    Thx

  • Is it possible to read/write Chinese character into Oracle 8i(WE8ISO8859P1) in Applet

    I can display Chinese character in swing label or text field, however, when I read
    the Chinese character data from (or write to) Oracle DB, it shows ??? instead. I can't
    change the code page of my DB, (if use ZHT16Big5 instead of WE8Iso8859P1 as the DB page
    code, than everything is OK. :< ) is there any solution for this?
    Server:
    DB:Oracle8i(8.1.6)with Character set: WE8ISO8859P1
    System Environment:NLS_LANG=American_America.WE9ISO8859P1
    OS: Win2000 Advance Server(NLS:950 Traditional Chinese)
    client:
    Applet (written by JDeveloper 3.2) compiled with code: ISO8859_1
    JDBC Driver: Oracle JDBC Thin Driver (ver 8.1.7 or 8.1.6)
    Browser: IE5.5 (with code Western Europe(ISO) or UTF-8 or Traditional Chinese...)
    null

    Eric,
    There is no good way to do this. In your ASP/ADO application I think you are creating a garbage in garbage out situation. Because the client NLS_LANG matches the DB characterset no conversion takes place. Therefore your chinese characters get inserted in the DB. But the data is really garbage.
    When you use Java thin driver a conversion automatically takes place from UCS-2 -> WE8ISO8859P1. The Chinese characters in UCS-2 have no equivalent code point in WE8ISO8859P1, so you end up with replacement characters ??

  • Chinese character in RecordStore

    Hi all,
    I am new to j2me. is it possible to key in Chinese character and store it in recordstore, and i can display the character back when i view the record?
    i have go through many examples of j2me encoding. but i still don't have any idea about how to do this.
    Thanks a lot...

    HongHong -
    There may be some tips you can use on www.77new.cn/program/i/1173293079453/001/029/14438.html -- I don't know chinese and the translation wasn't good enough for me to be sure about it.
    Have you tried? If your emulator or handset allows you to key in Chinese characters in a textField, they should be available via getString()and the resulting string should get stored OK, of course being a DBCS there wll be 2 bytes per letter.
    Recover the string from the RecordStore using
    new String(recordStore.getRecord(n));I have a MotoROKR E6 with alternative Chinese keyboard, shall experiment and get back to you in a day or two.
    Meanwhile, try for yourself and post the results.
    Regards, Darryl

  • Insert/Retrieve chinese character into/from MS Access

    Hi all,
    I want to know if there is concrete answer for the problem of maintaining chinese character in MS Access using jdbc/odbc. I have searched the forum but seems there is no working solution, am I correct?
    I am writing a db maintenace program in Win XP, using MS Access 2000, jdbc/odbc and Swing. I also got ?????? when retrieving chinese characters from Access. As I am not good at chinese encoding scheme, can anyone tell me how to solve the problem? How to retrieve chinese characters and display in a JTable/text field and how to save chinese characters into MS Access?
    Pls give me a hand, thanks in advance.

    If all else fails you can just encode them into something that is stored into MS Access. For example you could just use base64 encoding.

  • Use dbms_lob.loadfromfile to handle chinese character

    Hello,
    I have a database with NLS_LANG=TRADITIONAL CHINESE_HONG KONG.ZHT16BIG5
    There is a table with clob type column.
    I've tried to use dbms_lob.loadfromfile to load file content into the clob type column.
    But the result is that no matter the file is english or chinese character, the column's content will become "monster".
    Is there any method to solve this problem ?
    Can anyone help ?
    Rgds,
    Edward
    null

    Hi, it's me again.
    I just want to share my experience and hope that it can help someone and someone can help me !
    I've created a database with UTF8 as my character set.
    With session's character set = UTF8, when I tried to use dbms_lob.loadfromfile to load data into clob column from a file with chinese character content. What has been stored is "monster" character. I know that it's because bfile is with binary type and will not do character set conversion when loadfromfile is being used.
    I've tried the other way, I use dbms_lob.read to read the file and use utl_raw to convert it to UTF8 character set and store it in a varchar2. It works !
    But what I want is to store the chinese character into the clob column.
    I've tried to use the following option but still fail :
    - convert (it's seems that has no effect)
    - utl_raw.translate (it always get oracle error, I've use this as : utl_raw.translate(RAW, 'UTF8', 'UTF8'))
    - utl_raw.convert
    Hope that some have experience can help me !
    Rgds,
    Edward
    null

  • Oracle-chinese character XML

    does oracle database store chinese characters?
    How do i generate XML file using PL/SQL that support chinese character?
    will using XMLELEMENT work...? in that case.
    Thankyou for your replies.

    I do not have any personal experience with this, but it should work in theory - XMLELEMENT code should not care what characters are being stored in the database. Perhaps others with more experience with using XMLELEMENT can comment.
    Srini

  • How can i convert jstring to PSTR with chinese character

    Hi all,
    I'm not an expert of C++. So please help me to fix the following problem.
    I'm using jni to call the dll. In java side, the input parameter is jstring. In C++ side, the input parameter of PrintDrugReceipt are PSTR.
    The following is the code of my C++:
    #include <windows.h>
    #include <stdio.h>
    #include <jni.h>
    #include "DrugReceiptWrapper.h"
    #include "DrugReceipt.h"
    const char * JNU_GetStringNativeChars(JNIEnv *env, jobject obj, jstring jstr) {
    jbyteArray bytes = 0;
    jthrowable exc;
         jclass cls;
         jmethodID getBytes;
    char *result = 0;
    if ((*env)->EnsureLocalCapacity(env, 2) < 0) {
    return 0; /* out of memory error */
         cls = (*env)->GetObjectClass(env, obj);
         getBytes = (*env)->GetMethodID(env, cls, "getBytes","()[B");
         //jbyteArray buf = (jbyteArray*)(*env)->CallObjectMethod(env, obj, jlprSourceChiName, getBytes);
         bytes = (*env)->CallObjectMethod(env, jstr, getBytes);
         exc = (*env)->ExceptionOccurred(env);
         if (!exc) {
             jint len = (*env)->GetArrayLength(env, bytes);
             result = (char *)malloc(len + 1);
             if (result == 0) {
                 //JNU_ThrowByName(env, "java/lang/OutOfMemoryError", 0);
                 (*env)->DeleteLocalRef(env, bytes);
                 return 0;
    (*env)->GetByteArrayRegion(env, bytes, 0, len, (jbyte *)result);
    result[len] = 0; /* NULL-terminate */
    } else {
    (*env)->DeleteLocalRef(env, exc);
    (*env)->DeleteLocalRef(env, bytes);
    return result;
    JNIEXPORT jlong JNICALL
    Java_TestPrint_PrintDrugReceiptWrapper(
    JNIEnv *env, jobject obj,
    jstring jlprPrinterPort, jstring jlprSourceChiName,
    jstring jlprTargetChiName, jstring jlprPrintData1,
    jstring jlprPrintData2, jstring jlprCaseNo, jstring jlprReceiptNo){
         PSTR lprPrinterPort;
         PSTR lprSourceChiName;
         PSTR lprTargetChiName, lprPrintData1;
    PSTR lprPrintData2 , lprCaseNo, lprReceiptNo;
         printf("before %s", jlprSourceChiName);
         lprPrinterPort = (*env)->GetStringChars(env, jlprPrinterPort , 0);
         lprSourceChiName = (*env)->GetStringChars(env, jlprSourceChiName, 0);     
         lprTargetChiName = (*env)->GetStringChars(env, jlprTargetChiName, 0);
         lprPrintData1 = (*env)->GetStringChars(env, jlprPrintData1 , 0);
         lprPrintData2 = (*env)->GetStringChars(env, jlprPrintData2 , 0);
    lprCaseNo = (*env)->GetStringChars(env, jlprCaseNo , 0);
         lprReceiptNo = (*env)->GetStringChars(env, jlprReceiptNo , 0);
         PrintDrugReceipt(lprPrinterPort, lprSourceChiName, lprTargetChiName, lprPrintData1, lprPrintData2, lprCaseNo, lprReceiptNo);
         (*env)->ReleaseStringChars(env, jlprPrinterPort , lprPrinterPort);
         (*env)->ReleaseStringChars(env, jlprSourceChiName, lprSourceChiName);
         (*env)->ReleaseStringChars(env, jlprTargetChiName, lprTargetChiName);
         (*env)->ReleaseStringChars(env, jlprPrintData1 , lprPrintData1);
         (*env)->ReleaseStringChars(env, jlprPrintData2 , lprPrintData2);
         (*env)->ReleaseStringChars(env, jlprCaseNo , lprCaseNo);
         (*env)->ReleaseStringChars(env, jlprReceiptNo , lprReceiptNo);
         return 1;
    the h file:
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class TestPrint */
    #ifndef _Included_TestPrint
    #define _Included_TestPrint
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: TestPrint
    * Method: PrintDrugReceipt
    * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)J
    JNIEXPORT jlong JNICALL Java_TestPrint_PrintDrugReceiptWrapper
    (JNIEnv *, jobject, jstring, jstring, jstring, jstring, jstring, jstring, jstring);
    #ifdef __cplusplus
    #endif
    #endif
    Note: the jstring input parameters are the chinese character. If i print out the jstring, it will display dirty character, why? and how to fix it? and the PrintDrugReceipt will expected accept the chinese character and print it to the printer.
    Thank you for you guys help.
    Matthew

    you can't use char...have to use a wchar....and look around at the wide character handling function in C/C++.

  • Problem with chinese character for dot matrix epson LQ-1600K III

    Hi All,
    I really runs out of idea about my problem now. The problem is about Print Chinese character to dot matrix printer (Epson LQ-1600K III). I tried to so many device type to solve this issue, looks like the only device type can be use are CNSAPWIN and CNEPSON with CNSONG font type. The others if I print to the printer, the chinese character became # (although in the print preview it`s okay and display correctly).
    Here is the bottleneck if I use CNEPSON:
    - if I have 2 window at the left and right position, if the left window has chinese character, the right window automatically shift right about 1.5 CM, which is damn weird!!! Can somebody help me
    - I tried so many ways to adjust the line size for my detail window (to cater positioning at pre-printed boxes), but looks the font size always become 10pt and line size cannot be adjustable (based on smartstyle).BUT if I used device type epescp2, it can be done!
    Here is the bottleneck if I use CNSAPWIN:
    - I need to create format type in windows and SAP (SPAD). and every PC that use this printer, must define the Paper size ( China Special paper size 12inch)
    - I also think this is not a good idea because as I far as I know this is not the correct way..
    Therefore, if somebody has experience about printer chinese character to dot matrix for Smartform and sapscript..please kindly help me give some advice.
    Do I use the wrong device type?
    Thanks in advance!
    Regards,
    Willy

    Hi friends , we are using the same model ....
    Are you using the chinese version operation system ? because we can print the chinese charaters without problem in LQ 1600KIII .....
    We are using CNSAPWIN device type + Frondend printing access method ....
    Carlos Zhang

  • Acrobat Reader cannot display Traditional Chinese Character correctly in 64 bit Windows 7

    Hi,
    I get a pdf file cannot display chinese character properly in Windows 7 64 bit but Windows XP 32 bit.  I did uninstall and re-install Reader 9.4.3 and 10.0.1 with and without Traditional Fonts patch in the 64 bit machine but no luck.  Does anyone have a solution for this?
    Thanks in advance.

    I run Acrobat 9.3.3 on my Windows 7 Pro 64-bit system with no problems. Perhaps you should make sure you have all of Acrobat 9's maintenance installed.
    Ken Friedman

  • Data upload Vendor Master Chinese character from Excel does not upload

    Hi Gurus,
    We are trying to upload Vendor Master from Excel sheet.
    The Chinese characters in excel sheet is not getting uploaded.
    After upload, we see in SAP as ????? for these Chinese character.
    Could any one inform what setting I may need to change?
    Thanks and Best Regards,
    Mohan

    Hi Bala,
    Goto he Initial screen of SAP and click the ALT+F12    costomizating of local setup.the choose the options-->choose the I18N Tab in that POP up and check the Activate the multi byte support.
    press Apply and OK.
    close the  SAP Log on and Re-loag on.if u r not closing the Logon screen the changes wiil not effect.
    or
    click on the log on SAP and choose the server  name -->right click ->Properties>chose the log on language as chanies .-->Apply and Logon.
    Now u can eassily Upload to the Excel in checnies language.
    Thanks & REgards,
    Nelson.

  • GUI Download Chinese Character to Excel gibberish character

    Hi Experts,
    I'm facing a problem where I'm using FM gui_download to save Chinese Character into Excel file.
    Upon double click to open the excel file, funny character shows up.
    But if I were to open the same file using a blank Ms Excel application (Go to File->Open->choose file),
    Excel will prompt me to select a proper encoding (GB2312 in this case), and the Chinese character can be seen thereafter.
    But, my user doesn't want to go through this.
    I've browsed through the forum and someone has posted about this before and it's unanswered.
    How to download the chinese character using GUI_DOWNLOAD - unanswered
    And, Re: GUI_DOWNLOAD give 2 bytes for each chinese character - I need fixed len which is not related to my problem.
    Below is my code:
    DATA: lv_codepage   TYPE cpcodepage,
            lv_char_cpage TYPE abap_encod,
            lv_encoding   TYPE abap_encod.
    Get Code Page for Chinese Character Spras = '1' or 'ZH'
      CALL FUNCTION 'NLS_GET_FRONTEND_CP'
        EXPORTING
          langu                 = '1'   " Chinese Simplified Table T002
          fetype                = 'MS'  " Manufacturer is Microsoft Table TCP05
        IMPORTING
          frontend_codepage     = lv_codepage
        EXCEPTIONS
          illegal_syst_codepage = 1
          no_frontend_cp_found  = 2
          internal_or_db_error  = 3
          OTHERS                = 4.
    Conversion c(4) = n(10)
      lv_char_cpage = lv_codepage.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'                       "tried ASC and not working as well
          codepage                = lv_char_cpage   "8404 in this case tried 8400 and same result
          replacement             = '#'
          write_field_separator   = 'X'
        TABLES
          data_tab                = i_data_cnvr        "table content
          fieldnames              = i_data_head      "table header
    Please help. Does this has something to do with utf-8 encoding?
    Thank you.
    Thanks,
    ZY See

    Hi Nitesh,
    Is there a way to check the Excel codepage? Do you mean by codepage = 936 for GB2312 encoding?
    Anyway, this issue is fixed. Issue is related to unicode system.
    Below codes for gui_download solved the problem.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
          codepage                = '4103'
          replacement             = '#'
          write_field_separator   = 'X'
          write_bom               = 'X'
        TABLES
          data_tab                = i_data_cnvr
          fieldnames              = i_data_head
    Codepage = 4103 for utf-16 Unicode system.
    Write-bom = 'X' to write Byte-Order-Mark.
    Thanks,
    ZY See

  • GUI_DOWNLOAD give 2 bytes for each chinese character - I need fixed length

    Due to the Unicode system takes each Chinese character as a byte, the field(10) can take 10 Chinese Characters, not like before only 5 characters allowed.
    The problem is when the data is downloaded to a txt file. Some records contains only Western Europe charactes and will fill 10 bytes in the output file and other records contains only Chinese characters and will fill up 20 bytes in the output file.
    The data is exported for a system that can upload chinese characters, but only allow fixed record length file (always 10 bytes).
    In other words: the records with Western Europe characters should contain 10 characters = 10 bytes but the records with Chinese characters should only contain 5 characters = 10 bytes.
    Anyone who can solve this, thanks in advance.
    My code:
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
          FILENAME                = p_file
          CONFIRM_OVERWRITE       = 'X'
          codepage                = '8400' "Chinese
        CHANGING
          DATA_TAB                = it_output
        EXCEPTIONS

    Hi Thomas,
    Now I understand.
    Pl. check the class CL_ABAP_CONV_X2X_CE.
    May it can help u.
    Here is it's documentation.
    CL CL_ABAP_CONV_X2X_CE
    Short Text
    Code Page and Endian Conversion Between External Formats
    Functionality
    Instances of the class CL_ABAP_CONV_X2X_CE allow you to convert text data between different character sets and numeric data between different number formats (byte order).
    Using the class corresponds to transforming data from a binary input stream to a binary output stream: The data objects are read from the input buffer sequentially and written to an output buffer.
    The class methods are normally used as follows:
    CL_ABAP_CONV_X2X_CE=>CREATE
    This creates a conversion instance. Among other options, you can specify the following as parameters: The input buffer (that is the binary string that contains the data to be read), the character format at used in the input buffer, the byte order used in the input buffer, the character format to be used in the output buffer, or the byte order to be used in the output buffer.
    CONVERT_C, CONVERT_...
    This converts the data. Calling this method several times consecutively allows you to read data from the input buffer sequentially and add it to the end of the output buffer.
    GET_OUT_BUFFER
    This gets the output buffer, making it available for further processing (such as writing to a file, sending using RFC).
    RESET
    This allows you to reset individual attributes of the conversion instance. (This method is especially designed for restarting on a new input buffer and deleting the output buffer while retaining the remaining attributes.)
    Relationships
    CL_ABAP_CONV_IN_CE
    Converting Binary Data into ABAP Data Objects
    CL_ABAP_CONV_OUT_CE
    Converting ABAP Data Objects to a  Binary Format.
    CL_ABAP_CHAR_UTILITIES
    Various Attributes and Methods for Character Sets and Byte Order
    Example
    In the following example, UTF-8 texts are converted to the codepage 1100 (Latin-1) and numbers are converted from little-endian to big-endian format:
    DATA:
      in_buffer TYPE XSTRING,
      out_buffer TYPE XSTRING,
      conv TYPE REF TO cl_abap_conv_x2x_ce.
    in_buffer = '414220C3B602010000'.
    conv = cl_abap_conv_x2x_ce=>create(
             in_encoding = 'UTF-8'
             in_endian = 'L'
             out_encoding = '1100'
             out_endian = 'B'
             input = in_buffer
    CALL METHOD conv->convert_c( n = 5 ).
    CALL METHOD conv->convert_i( ).
    out_buffer = conv->get_out_buffer( ).
    The content of the in_buffer variable is made up of  5 bytes (hexadecimal "414220C3B6"), which represent 4 UTF-8 characters (A, B, SPACE, o-Umlaut), and 4 bytes (hexadecimal "02010000"),  which represent the value 258 in little-endian format. This data is converted and the out_buffer variable now contains the hexadecimal string "414220F600000102". It is made up of:
    4 bytes (hexadecimal "414220F6"), which represent the above  4 characters in codepage 1100 (ISO-8859-1). Note that the length specification n = 5 refers to the number of elementary characters to be converted. For multi-byte codepages like UTF-8 this means that the multi-byte character "C3B6" is counted in length 2.
    4 Bytes (hexadecimal "00000102"), which represent the value 258 in big-endian format.
    If you have the desired byte order in the old format as expected by TRANSLATE ... NUMBER FORMAT (as an N(4) value), you can proceed as follows:
    TYPE-POOLS: ABAP.
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    DATA:
      in_number_format(4) TYPE N VALUE '0101',
      out_number_format(4) TYPE N VALUE '0000'.
    DATA:
      in_endian TYPE ABAP_ENDIAN,
      out_endian TYPE ABAP_ENDIAN,
      conv TYPE REF TO cl_abap_conv_x2x_ce..
    in_endian  = cl_abap_char_utilities=>number_format_to_endian(
                   in_number_format
    out_endian = cl_abap_char_utilities=>number_format_to_endian(
                   out_number_format
    conv = cl_abap_conv_x2x_ce=>create(
             in_encoding = 'UTF-8'
             in_endian = in_endian
             out_encoding = '1100'
             out_endian = out_endian
             input = in_buffer
    Notes
    For details refer to the documentation for the individual methods.
    Regards,
    Joy.

Maybe you are looking for