File Formating in UTF-8

Hello,
I am generating CSV file with different API, and by using COPY query in Postgres I am populating database. But while reading such file database gives error like "invalid UTF-8 byte sequence detected near byte 0xa0". So can we change file format to UTF with any of the JAVA or org.apache API??
Thanks & Regards,
Kasturi Karlekar.

If your CSV API offers the option of saving as UTF-8 (and it should), that would be the best way to go. Otherwise, you can use InputStreamReader and OutputStreamWriter to convert the file.

Similar Messages

  • Convert file format into UTF-8 while generating text file on FTP server

    Hi Expert,
    I have the requirement to generate text file store it in FTP server and file format should be in UTF-8.
    ABAP Development is completed but text file format generate in ANSI which not acceptable by client.For generating text file and store it on FTP server by using standard function module FTP_R3_TO_SERVER ,but in this function module there is no any parameter option like CODEPAGE for file format conversion. Is there any method or any function module to convert file format to UTF-8 and directly transfer or store it on FTP server.
    <<removed_by_moderator>>
    Thanks ,
    Edited by: Vijay Babu Dudla on Jan 28, 2009 12:48 AM

    I have come across the same issue.  Try calling the FTP_COMMAND function module to make it go into ASCII mode before your FTP the file, like this:
    data: result type table of text with header line.
    call function 'FTP_COMMAND'
        exporting
          handle        = hdl
          command       = 'ascii'
        tables
          data          = result
        exceptions
          tcpip_error   = 1
          command_error = 2
          data_error    = 3.
      call function 'FTP_R3_TO_SERVER'
        exporting
          handle         = hdl
          fname          = docid
          character_mode = 'X'
        tables
          text           = gt_your_table .

  • Regarding the File Format on the application server

    Hi,
    I would like to know the file format (ANSI, UTF-8, UTF-16, UTF-32) of the file placed on the application server in my program. Can anyone help me with the Function Module or Class or any other way which will retrieve this information.
    Thanks
    Sarves S V K

    Hi
    You can try the standard class CL_ABAP_FILE_UTILITIES and the method
      CALL METHOD cl_abap_file_utilities=>check_utf8 
        EXPORTING 
         file_name = filename 
        IMPORTING 
         bom       = file_bom 
         encoding  = file_encoding. 
    Check the possible values returned by encoding and BOM:
    NO_BOM
    BOM_UTF8
    BOM_UTF16_BE
    BOM_UTF16_LE
    ENCODING_UTF8
    ENCODING_7BIT_ASCII
    ENCODING_OTHER

  • Unicode file formats ( open dataset)

    Hi,
    We are sending Unicode file with encoding as UTF-8( open dataset) containing Greek character to Legacy system. Legacy system( Sql server) is not able to understand this file format. As a workaround legacy side team coverts the file to Unicode UCS-2 using notepad ( by selecting encoding option as Unicode) and then uploading it to SQL server..
    Is there anyway to convert the UTF-8 file to other Unicode file format ( say UCS-2 )within SAP or generate the desired file format.

    Hi Martin,
    Thanks for the help!!!
    I tried  to convert the file format from UTF-8 to UCS-2  using the methods of the class mentioned but it didn't fulfill my requirement.  I have Greek character in UTF-8 format and when I convert it to any other other format then Greek character are displayed as #.
    Problem is legacy SQL server don't support UTF-8 format.  I tried open data set with binary mode & also legacy text mode with all available code pages but result were not fruitful.
    ( Program RSCP_CONVERT_FILE to convert code page - I used target code page as all possible UTF* , UCD* & Greek code page but no luck ).
    I am just wondering whether SAP can convert UTF-8 to UCS-2 or not. Other option I am thinking is to have the file converted by Unix script  that is application server external command which can be executed via FTP.

  • ABAP to XML file - Formatting problem and UTF-8 requirement

    Hi Everyone,
    Could you please guide us on the ABAP coding required to get the proper XML file format. We have prepared the code for downloading SAP transaction data into an XML file format. However, we are stuck with an improper format as per Example 1.
    The file format we get is this:
    Example 1:
    <?xml version="1.0"?><FDXLMDOrd><FXNHdrLp><CrtDtTm>20070613094517</CrtDtTm><MsgID>319304155</MsgID><MsgTyp>850</MsgTyp><MsgSubTyp>SALES_A</MsgSubTyp><Pr
    <RcvTP>FSCS</RcvTP><SndSrc>FXN</SndSrc><RcvSrc>EIB</RcvSrc><UsrID>VAR</UsrID></FXNHdrLp><OrdHdrLp><OrdNbr>319304155</OrdNbr><OrdActnCD>9</OrdActnCD><Ord
    teCarrReq>FDE</RteCarrReq><RteTptSvcReq>FEIP</RteTptSvcReq></DprtRteLp><SpecInstrLp><SpecInstrTyp>SHIP</SpecInstrTyp><SpecInstr>Example Packing Instruct
    les Order</RefDesc></RefLp><RefLp><RefIDQual>CPO</RefIDQual><RefID>test 1 line 1 pc - s</RefID><RefDesc>Customers Customer Purchase Order</RefDesc></Ref
    Typ><EntIDQual>91</EntIDQual><EntID>H00092</EntID><EntNm>VLAD BOBES</EntNm><Cty>MONTREAL</Cty><PstlCD>H3X 2N5</PstlCD><RgnalCD>QC</RgnalCD><CtryISOCD>CA
    ></AdrLnLp><ConLp><ConTypCD>IC</ConTypCD><ConNm>VLAD BOBES</ConNm><CommLp><CommNbrQual>TE</CommNbrQual><CommNbr>514-731-8361</CommNbr></CommLp></ConLp><
    <Cty>MONTREAL</Cty><PstlCD>H3X 2N5</PstlCD><RgnalCD>QC</RgnalCD><CtryISOCD>CA</CtryISOCD><AddlNmLp><AddlNm1>VLAD BOBES</AddlNm1></AddlNmLp><AdrLnLp><Str
    However, the format need to look like this as in Example 2 below.
    We also need help in how to get  " encoding="UTF-8"?> " as part of the file format.
    Example 2:
    <?xml version="1.0" encoding="UTF-8"?>                
    <FDXLMDProdRcpt>                                      
        <FXNHdrLp>                                        
            <CrtDtTm>20070612151817</CrtDtTm>             
            <SessID>26796</SessID>                        
            <MsgTyp>861</MsgTyp>                          
            <MsgSubTyp>WRE_A</MsgSubTyp>                  
            <PrcsingPrty>5</PrcsingPrty>                  
            <SndTPQualCD>ZZ</SndTPQualCD>                 
            <SndTP>FSCS</SndTP>                           
            <RcvTPQualCD>ZZ</RcvTPQualCD>                 
            <RcvTP>EIB</RcvTP>                            
            <SndSrc>YANTRA</SndSrc>                       
            <RcvSrc>EIB</RcvSrc>                          
            <UsrID>VAR</UsrID>                            
        </FXNHdrLp>                                       
        <ProdRcptHdrLp>                                   
            <ShpID>VAR20070612NCHIC1</ShpID>              
            <ShpTyp> </ShpTyp>                            
            <ShpActnCD>00</ShpActnCD>                     
            <InTransMrgTyp> </InTransMrgTyp>              
            <ShpVolUOM>CI</ShpVolUOM>                     
            <ShpWgtUOM>LB</ShpWgtUOM>                     
            <ShpTotVol>310022.00</ShpTotVol>              
            <ShpTotWgt>861.00</ShpTotWgt>                 
            <DtTmLp>                                      
                <DtTyp>050</DtTyp>                        
                <DtTmQual>501</DtTmQual>                  
                <DtTm>2007-06-12T15:07:41-04:00</DtTm>    
            </DtTmLp>                                     
            <AdrLp>                                       
                <EntTyp>RC</EntTyp>                       
                <EntIDQual>93</EntIDQual>                 
                <EntID>NCHIC</EntID>                      
                <EntNm>NCHIC</EntNm>                      
                <AutoCrtTrdPar>0</AutoCrtTrdPar>          
                <AutoCrtTrdParRole>0</AutoCrtTrdParRole>  
                <AutoUpdtTrdPar>0</AutoUpdtTrdPar>        
            </AdrLp>                                      
            <ProdRcptTptLp>                               
                <TptIDQual>BOL</TptIDQual>                
                <TptSCAC> </TptSCAC>                      
                <TptID> </TptID>   
    Thanks and Best Regards
    Sitaraman

    You could try to use the following coding:
    *& Report  ZUS_SDN_UC_XML_TO_UTF8_TRANSF
    REPORT  zus_sdn_uc_xml_to_utf8_transf.
    define local data
    CONSTANTS:
      gc_encoding           TYPE string VALUE 'UTF-8'.
    DATA:
      gd_result             type string,
      go_ixml               TYPE REF TO if_ixml,
      go_stream_factory     TYPE REF TO if_ixml_stream_factory,
      go_encoding           TYPE REF TO if_ixml_encoding,
      go_resstream          TYPE REF TO if_ixml_ostream.
    DATA:
      gt_knb1    TYPE STANDARD TABLE OF knb1,
    gd_xml     TYPE string,
      gt_xml     TYPE TABLE OF string.
    START-OF-SELECTION.
      SELECT * FROM knb1 INTO TABLE gt_knb1 UP TO 10 ROWS
          WHERE bukrs = '1000'.
      go_ixml = cl_ixml=>create( ).
      go_stream_factory = go_ixml->create_stream_factory( ).
      go_encoding = go_ixml->create_encoding( character_set = gc_encoding
                                            byte_order = 0 ).
      go_resstream =
                  go_stream_factory->create_ostream_cstring( gd_result ).
      CALL METHOD go_resstream->set_encoding
        EXPORTING
          encoding = go_encoding.
    XML Transformieren
      CALL TRANSFORMATION id_indent
        SOURCE     itab = gt_knb1
        RESULT XML go_resstream.
      APPEND gd_result TO gt_xml.
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
         BIN_FILESIZE              =
          filename                  = 'C:\temp\xml_to_utf8.txt'
         FILETYPE                  = 'ASC'
         APPEND                    = SPACE
         WRITE_FIELD_SEPARATOR     = SPACE
         HEADER                    = '00'
         TRUNC_TRAILING_BLANKS     = SPACE
         WRITE_LF                  = 'X'
         COL_SELECT                = SPACE
         COL_SELECT_MASK           = SPACE
         DAT_MODE                  = SPACE
         CONFIRM_OVERWRITE         = SPACE
         NO_AUTH_CHECK             = SPACE
         CODEPAGE                  = SPACE
         IGNORE_CERR               = ABAP_TRUE
         REPLACEMENT               = '#'
         WRITE_BOM                 = SPACE
         TRUNC_TRAILING_BLANKS_EOL = 'X'
       IMPORTING
         FILELENGTH                =
        CHANGING
          data_tab                  = gt_xml
        EXCEPTIONS
          file_write_error          = 1
          no_batch                  = 2
          gui_refuse_filetransfer   = 3
          invalid_type              = 4
          no_authority              = 5
          unknown_error             = 6
          header_not_allowed        = 7
          separator_not_allowed     = 8
          filesize_not_allowed      = 9
          header_too_long           = 10
          dp_error_create           = 11
          dp_error_send             = 12
          dp_error_write            = 13
          unknown_dp_error          = 14
          access_denied             = 15
          dp_out_of_memory          = 16
          disk_full                 = 17
          dp_timeout                = 18
          file_not_found            = 19
          dataprovider_exception    = 20
          control_flush_error       = 21
          not_supported_by_gui      = 22
          error_no_gui              = 23
          OTHERS                    = 24.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    END-OF-SELECTION.
    However, I like to mention that the file created from out ECC 5.0 (6.40, non-Unicode) contains a special character between the XML header and the data part (when displayed using NotePad Editor):
    ...xml version="1.0" encoding="utf-8"?>[special character]<asx:abap xmlns:asx="http://www.sap.com/a...
    Using a HexEditor the special character (0x0A) is displayed as a dot.
    Also Check with FM - TREX_TEXT_TO_UTF8
    Reward Points if it is helpful
    Thanks
    Seshu

  • The file should be in XML-BURSTING-FILE format.

    I'm gettting an error when I try to upload my xml bursting control file for my oracle report that has an rtf template defined.
    The error message says"The uploaded file MT_RAXINV.xml is invalid. The file should be in XML-BURSTING-FILE format."
    and my code is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" >
    <xapi:globalData location="stream">
    </xapi:globalData >
    <xapi:request select="/ZRAXINV/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_INVOICE/G_INVOICE">
    <xapi:delivery>
    <xapi:email server="mailhost.microtune.com" port="25" from="[email protected]"
    reply-to ="[email protected]" >
    <! - filter=".//G_INVOICE[BILL_TO_EMAIL IS NOT NULL]"- >
    <xapi:message id="${TRX_NUMBER}" to="[email protected]" cc="[email protected]" attachment="true"
    subject="Microtune Inc - Receivables Statement for payment due from ${BILL_CUST_NAME}">
    Please find attached Receivables Statement for payment due of ${TOTAL_AMOUNT_DUE}.
    Regards,
    The Receivables Team
    Microtune Inc
    </xapi:message>
    </xapi:email>
    <xapi:print id="printer_tune"
    printer="ipp:\\congo\sunset" filter=".//G_INVOICE[BILL_TO_EMAIL=NULL]" copies="1" />
    <xapi:filesystem output="\\astro\erp\Oracle\${TRX_NUMBER}.pdf"/>
    <! - Add an id for this delivery method i.e. printer1 - >
    </xapi:delivery>
    <xapi:document output-type="pdf" delivery="printer_tune,${TRX_NUMBER}">
    <! - Deliver to printer and email - >
    <xapi:template type="rtf" location="xdo://SQLAR.ARInvoice.en.US/"?getSource=true" filter="">
    <! - Specify template to be used for Receivables Statements- >
    </xapi:document>
    </xapi:request>
    </xapi:requestset>
    Any help would be much appreciated.
    Thanks,
    Leo

    Thanks, for the update. Sorry I did not update this entry, I had actually figured that out but still my problem is that my email is sending without an attachment. I'm not getting any error and the email is sending fine but without the attachment.
    <?xml version="1.0" encoding="UTF-8"?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
    <xapi:request select="/ZRAXINV/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_INVOICE/G_INVOICE">
    <xapi:delivery>
    <xapi:email server="mailhost.microtune.com" port="25" from="[email protected]" reply-to ="[email protected]">
    <xapi:message id="${TRX_NUMBER}" to="[email protected]" cc="[email protected]" attachment="true"
    subject="Microtune Inc - Receivables Statement for payment due from ${BILL_CUST_NAME}">
    Please find attached Receivables Statement for payment due of ${TOTAL_AMOUNT_DUE}.
    Regards,
    The Receivables Team
    Microtune Inc.
    </xapi:message>
    </xapi:email>
    </xapi:delivery>
    <xapi:document output="Invoice_${TRX_NUMBER}" output-type="pdf" delivery="${TRX_NUMBER}">
    <xapi:template type="rtf" location="xdo://SQLAR.ZRAXINV.en.US/?getSource=true"></xapi:template>
    </xapi:document>
    </xapi:request>
    </xapi:requestset>

  • File Adapter -- File Format (Mapping Error)

    Hi All, am using a file adapter to pick up file using content conversion , but i can see it happens to be mapping error, i have set all in right format but below one thing i cud not understand how to change, as shown bellow.
    Test XML format in mapping:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_DMS_FINAL xmlns:ns0="http://dms:scenario">
       <Record>
          <Row>
             <FirstName/>
          </Row>
       </Record>
    </ns0:MT_DMS_FINAL>
    actual XML picked up by Sender File Adapter:
      <?xml version="1.0" encoding="utf-8" ?>
      <ns:MT_DMS_FINAL xmlns:ns="http://dms:scenario">
      <Record>
      <Row>
      <FirstName>296501_000_00</FirstName>
      </Row>
      </Record>
      </ns:MT_DMS_FINAL>
    The difference between both is the "ns0" and "ns" , how to make it equal , which part is to be modified to make it equal, kindly revert back with solution.
    With regards
    Srinivas

    Hi ,
    Thx for replies , i followed as shown in above blog and went fine but there is mapping error as shown below,
    xml format after pick by sender file adapter
      <?xml version="1.0" encoding="utf-8" ?>
      <MT_DMS_FINAL>
      <Record>
      <Row>
      <FirstName>296501_000_00</FirstName>
      </Row>
      </Record>
      </MT_DMS_FINAL>
    xml file format from test tab in Message mapping
    <?xml version="1.0" encoding="UTF-8"?>
    <MT_DMS_FINAL>
       <Record>
          <Row>
             <FirstName>296501_000_00</FirstName>
          </Row>
       </Record>
    </MT_DMS_FINAL>
    See above xml first statment is different , how to make it equal
    Help
    Srini

  • File format for newline character

    Hi there, I have a scenario to do. From IDOC to flat file. I receive a number of idocs and must convert them into a flat file. Each idoc must start on a new line. Each line represents a new record. I have done this and it works fine. But now the system reading the flat file is having trouble with the newline character. Im using ABAP mapping to create the flat file and the newline characters I tried are
    l_crlf(2) VALUE %_cr_lf
    l_crlf(1) VALUE %_NEWLINE
    Lest say I open the flatfile in MS Word and do a character count it shows as 100 char's but on there system it shows as 101. It has something to do with the file format..
    Does anyone know how to fix this?
    Thanx,
    Jan

    It turnes out that their file encoding was not the same as ours so I just changes the file type brom binary to text and set the encoding to UTF-8
    Thanx,
    Jan

  • Writing XMP to multiple file formats (PDF, JPEG,  TIFF, etc)

    Hi,
    I am developing a server-side component that embeds XMP data into a file (of various formats) and then provides these files for client download.
    I have been using the XMP toolkit for generating the metadata, however i now have the problem of getting this metadata into the relevant file. I could always develop this myself but it seems like a huge amount of work. So to make my life easier, does anyone know of any toolkits (from adobe or otherwise) that support writing XMP data into different file formats (PDF, JPEG, TIFF, AIFF, MPEG etc) ??
    I am developing in Java so I would prefer Java libraries, however I can always use JNI calls to C/C++ (as i have with the XMP toolkit).
    Any help would be very appreciated.
    Regards,
    Jude

    Greetings,
    I think we should standardize some information, I know for a fack, that I will support adding XMP metadata in the HDF, RIFF, IFF and OLE file formats. If you have any specific suggestions on the chunk information or signature information that I should use, let me know?
    For my part, I was thinking of adding RIFF,IFF chunks with the name \ xmp in those file formats. For OLE, maybe an added stream with the xmp name (in UTF-16).
    Comments welcome everyone!

  • Highlight File Format and PDF Documents with Chinese and English characters

    I'm a developer working on an application that makes use of the Highlight File Format / external highlight server capabilities of Adobe Reader.
    The highlighting worked correctly until we started to introduce pdf documents that were scanned to recognize Chinese in addition to English.
    The xml file seems to have the correct values in it. For example, if the 10 characters to highlight are at position 41 on the first page. The "xml" file has the <loc pg=0 pos=41 len=10>.
    If the document is scanned for English only, it works fine. That is, the highlight starts at character 41. If the same document is scanned for Chinese and English, the highlight starts at character 22.
    Has anyone had a similar experience? Do you know a solution?

    Hi,
    I don't know about BIP and the specifics of your context, but here are some general answers for the XLIFF format:
    <?xml version = '1.0' encoding = 'utf-8'?>
    Can we change encoding to 'ISO-8859-1' as soon as we convert the file format ?If you also save the file to ISO-8859-1 as well yes. But you can do this only for languages supported by Latin-1. It makes sense to keep the files in UTF-8.
    A-2) he section <header><skl><internal-file> contains a huge string
    which seeem to be binary ... What is this ? can we delete it ?That's likely to be the skeleton file. The data used to rebuild the original format after translation.
    Most likely it should stay there.
    A-3) Can we have one XLF file with muliple <file> sections (one per language to translate to ) ?
    This can be very useful for us to manage one only translation file per report template.Yes but no: yves you can have several <file> elements in an XLIFF document, but no: they must be for the same language pair. XLIFF is designed to work with bi-lingual files, not multi-lingual files.
    A-4) the most important section for translation is included in the <trans-unit> tag .
    Each one has a distinct id like ""49e41f8f" ... Can we replace this by a more meaningfull value ?Those id attributes are used by the filter to merge back the data after translation. You should preserve them.
    A-5) the language format is like "en-US" (language code + territory code).
    Is it case sensitive ? No it is not case-sensitive (en-us == en-US). The values of xml:lang are not case sensitive (unlike other XML attribute values).
    en-US is just the recommended notation.
    The XLIFF specification are here:
    http://docs.oasis-open.org/xliff/xliff-core/xliff-core.html
    Hope this helps,
    -ys

  • Need to add a  field for SEPA DME file format

    Hi SAP Gurus,
    I am working XML DME file format, i configured every thing properly But i am not able to Map below requirement
    I have to bring Client ID(GATTGB22@|@) as a first field in file then only bank can process
    This requirement we have to map this some where   other than DMEE T. Code
    Kindly Guide me on this
    Client required Below file format
    *GATTGB22@|@<?*xml version="1.0"; encoding="utf-8"?>
    <Document xmlns='xmlns="namespaceURI"' xmlns:xsi="www.XXXXXXXXX.com"; xsi:schemaLocation="C:\Documents and Settings\xxxxxxxxxx.CORP\Desktop\SEPA.txt";>
    <pain.001.001.02>;
    <GrpHdr>
    <MsgId>1000004409B</MsgId>
    <CreDtTm>2011-04-06T11:11:50</CreDtTm>
    <NbOfTxs>2</NbOfTxs>
    <CtrlSum>2000.00;/CtrlSum>
    <Grpg>MIXD</Grpg>
    <InitgPty>
    Now i am getting in below format
    <?xml version="1.0"; encoding="utf-8"?>
    <Document xmlns='xmlns="namespaceURI"' xmlns:xsi="www.XXXXXXXXXXx.Com"; xsi:schemaLocation="C:\Documents and Settings\XXXXXXXXX.CORP\Desktop\SEPA.txt";>
    <pain.001.001.02>;
    <GrpHdr>
    <MsgId>1000004409B</MsgId>
    <CreDtTm>2011-04-06T11:11:50</CreDtTm>
    <NbOfTxs>2</NbOfTxs>
    <CtrlSum>2000.00;/CtrlSum>
    <Grpg>MIXD</Grpg>
    <InitgPty>
    Thanks in advance

    Hi,
    check these enhancements
    COPA0001  Enhancement for derivation in Profitability Analysis (C
    COPA0002  Enhancement for valuation in Profitability Analysis (CO
    COPA0003  Enhancement for assignment to profitability segment (CO
    COPA0004  Enhancement for currency translation (CO-PA)
    COPA0005  Enhancement for actual data update (CO-PA)
    COPA0006  Enhancement for planning (CO-PA)
    COPA0007  Enhancement for external data transfer (CO-PA)
    i think you should get it provided you should follow proper procedure .
    otherwise you need to create Implicit Enhancement spot.
    regards
    fareed

  • Text file attachment in UTF-8 encoding

    Hi
    I have written a program which sends  mails to the users with text file attached. the problem is the text file when you save it to the local desktop ( by clicking on save as ) the encoding is by default ANSI. I want to make the encoding as UTF-8. Is it possible to change this in program?.
    thanks
    sankar

    OPEN DATASET - encoding
    Syntax
    ... ENCODING { DEFAULT
                 | {UTF-8 [SKIPPING|WITH BYTE-ORDER MARK]}
                 | NON-UNICODE } ... .
    Alternatives:
    1. ... DEFAULT
    2. ... UTF-8 [SKIPPING|WITH BYTE-ORDER MARK]
    3. ... NON-UNICODE
    Effect
    : The additions after ENCODING determine the character representation in which the content of the file is handled. The addition ENCODING must be specified in Unicode programs and may only be omitted in non-Unicode programs. If the addition ENCODING is not specified in non-Unicode programs, the addition NON-UNICODE is used implicitly.
    Note
    : It is recommended that files are always written in UTF-8, if all readers can process this format. Otherwise, the code page can depend on the text environment and it is difficult to identify the code page from the file content.
    Alternative 1
    ... DEFAULT
    Effect
    : In a Unicode system, the specification DEFAULT corresponds to UTF-8, and in a non-Unicode system, it corresponds to NON-UNICODE.
    Alternative 2
    ... UTF-8 [SKIPPING|WITH BYTE-ORDER MARK]
    Addition:
    ... SKIPPING|WITH BYTE-ORDER MARK
    Effect
    : The characters in the file are handled according to the Unicode character representation UTF-8.
    Notes
    : The class CL_ABAP_FILE_UTILITIES contains the method CHECK_UTF8 for determining whether a file is a UTF-8 file.
    A UTF-16 file can only be opened as a binary file.
    Addition
    ... SKIPPING|WITH BYTE-ORDER MARK
    Effect
    : This addition defines how the byte order mark (BOM), with which a file encoded in the UTF-8 format can begin, is handled. The BOM is a sequence of 3 bytes that indicates that a file is encoded in UTF-8.
    SKIPPING BYTE-ORDER MARK
    is only permitted if the file is opened for reading or changing using FOR INPUT or FOR UPDATE. If there is a BOM at the start of the file, this is ignored and the file pointer is set after it. Without the addition, the BOM is handled as normal file content.
    WITH BYTE-ORDER MARK
    is only permitted if the file is opened for writing using FOR OUTPUT. When the file is opened, a BOM is inserted at the start of the file. Without the addition, no BOM is inserted.
    The addition BYTE-ORDER MARK cannot be used together with the AT POSITION.
    Notes
    : When opening UTF-8 files for reading, it is recommended to always enter the addition SKIPPING BYTE-ORDER MARK so that a BOM is not handled as file content.
    It is recommended to always open a file for reading as a UTF-8 with the addition WITH BYTE-ORDER MARK, if all readers can process this format.
    Alternative 3
    ... NON-UNICODE
    Effect
    : In a non-Unicode system, the data is read or written without conversion. In a Unicode system, the characters of the file are handled according to the non-Unicode codepage that would be assigned at the time of reading or writing in a non-Unicode system according to the entry in the database table TCP0C of the current text environment.

  • What file format Oracle Database 11g can spool data w chinese characters?

    Hi,
    I have a batch job that spools data into a text file for further processing but now I have data that contains chinese characters.
    From what I know text file (.txt) cannot support chinese characters.
    Anyone has any idea what file format Oracle Database 11g can spool data with chinese characters?
    Thank you!
    Regards,
    Fel

    I'm not sure this can work with SQL*Plus in character mode on Windows DOS mode. But this should work with SQL Developer: see Re: How to display Chinese characters in Oracle?
    I can also make this work with Linux:
    $ locale
    LANG=fr_FR.UTF-8
    LC_CTYPE="fr_FR.UTF-8"
    LC_NUMERIC="fr_FR.UTF-8"
    LC_TIME="fr_FR.UTF-8"
    LC_COLLATE="fr_FR.UTF-8"
    LC_MONETARY="fr_FR.UTF-8"
    LC_MESSAGES="fr_FR.UTF-8"
    LC_PAPER="fr_FR.UTF-8"
    LC_NAME="fr_FR.UTF-8"
    LC_ADDRESS="fr_FR.UTF-8"
    LC_TELEPHONE="fr_FR.UTF-8"
    LC_MEASUREMENT="fr_FR.UTF-8"
    LC_IDENTIFICATION="fr_FR.UTF-8"
    LC_ALL=
    $ cat chinese.sql
    cat tchinese.sql
    set echo on
    spool tchinese.log
    select * from v$version;
    select unistr('\8349') from dual;
    exit
    $ cat tchinese.log
    SQL> select * from v$version;
    BANNER                                                                         
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod               
    PL/SQL Release 10.2.0.1.0 - Production                                         
    CORE     10.2.0.1.0     Production                                                     
    TNS for Linux: Version 10.2.0.1.0 - Production                                 
    NLSRTL Version 10.2.0.1.0 - Production                                         
    SQL> select unistr('\8349') from dual;
    UNIS                                                                           
    草                                                                              Edited by: P. Forstmann on May 27, 2009 10:30 AM
    Edited by: P. Forstmann on May 27, 2009 10:33 AM

  • Move DeltaX in style change record in swf file format

    Hi
    can anybody suggest that MoveDeltaX field in
    StyleChangeRecords of swf file format is a absolute value or a
    relative value?
    Document says its a relative! But what I observed by a sample
    file created by macromedia flash publisher is absolute!!
    If i need to scale a shape,Do I need to scale the
    MoveDeltaX...as we are doing for DeltaX and DeltaY of
    StraightEdgeRecord.
    thankyou.

    Hi ,
    Thx for replies , i followed as shown in above blog and went fine but there is mapping error as shown below,
    xml format after pick by sender file adapter
      <?xml version="1.0" encoding="utf-8" ?>
      <MT_DMS_FINAL>
      <Record>
      <Row>
      <FirstName>296501_000_00</FirstName>
      </Row>
      </Record>
      </MT_DMS_FINAL>
    xml file format from test tab in Message mapping
    <?xml version="1.0" encoding="UTF-8"?>
    <MT_DMS_FINAL>
       <Record>
          <Row>
             <FirstName>296501_000_00</FirstName>
          </Row>
       </Record>
    </MT_DMS_FINAL>
    See above xml first statment is different , how to make it equal
    Help
    Srini

  • Today, after having published my website without difficulty for years, I got an error message saying that the file format was unrocognized.  Anyone have any suggestions.

    Today,  after having published my website without difficulty for years, I got an error message saying that the file format was unrocognized.  Anyone have any suggestions.

    You need to give some more info.
    How are you publishing your site - iWeb FTP or another application? If the latter, is the encoding set to Unicode (UTF-8)?
    Who is giving you this message - the server?

Maybe you are looking for