Flat file with chinese characters

Hi all,
I am working on a solution to map a file with this structure (not xml):
//.comment 1
0~keyh2..hn~
0~it1it2..itn~key
0~it1it2..itn~key
//.comment 2
0~keyh2..hn~
0~it1it2..itn~key
0~it1it2..itn~key
0~it1it2..itn~key
This is my conversion setup
recordser.structure = comment,1,header,1,item,*
recordset.sequence = variable
keyFieldName = key
comment.fieldSeparator = .
comment.fieldStructure = key.comment
comment.keyFieldValue = //
header.fieldSeparator = ~~
header.beginSeparator = 0~~
header.endSeparator = ~~
header.fieldStructure = 0~keyh2..hn~
header.keyFieldValue = 0
item.fieldSeparator = ~~
item.beginSeparator = 0~~
item.fieldStructure = 0~it1it2..itn~key
item.keyFieldValue = 1
The problem now is that this file come from Chinese system and it is provide with chinese letters (looks like 2 bytes per letter). When I provide character encoding as ISO-2022 then adapter shows exception:
java.io.UnsupportedEncodingException
when I try to process it without passing any encoding then the exception is:
more elements in file csv structure than field names specified
Is there anyone who can help me with these?
br
Dawid

Hi,
I think it is something wrong with the File content conversion parameters parameters.
You can avoid comment 1 and comment 2 by using the parameter Document offset.Follow this link for that:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm</a>.
I think you didn't specify the field names in the File Content Conversion parameters.
Follow these two weblogs for the File Content Conversion parameters:
<a href="/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30:///people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
<a href="/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter">/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter</a>
Hope it helps.
Regards,
JE

Similar Messages

  • Create a flat file with multiple characters for enclosures

    Hello,
    we use OWB 11g2 (11.2.02).
    Now we try to create a flat file with multiple characters for enclosures. The manual wrote:
    "Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file contains enclosures, enter an enclosure character in the text box or select one from the list. The list displays commonenclosures. However, you may enter any character. The default for both the left and right enclosure is the double quotation mark ("). You can specify multiple characters and hexadecimal characters as field enclosures."
    But it will not work. The OWB use the first character from the left enclosure definition as left enclosure and the second one as right enclosure !?!
    Did anyone know this behavior? Is there a solution for this problem?
    Thanks and regards
    Norbert

    HI Raghu,
               Use the function module 'GUI_UPLOAD'.
               In that you have to specify the field_separator value = 'X' in export section.
    Regards,
    S.C.K

  • How can we load a flat file with very, very long lines into a table?

    Hello:
    We have to load a flat file with OWB. The problem is that each of the lines in the file might be up to 30.000 characters long (up to 1.000 units of information in each line, 30 characters long each)
    Of course, our mapping should insert these units of information as independent rows in a table (1.000 rows, in our example).
    We do not know how to go about it. We usually load flat files using table functions, but we am not sure that they will be able to cope with these huge lines. And how should we pivot those lines? Will the Pivot operator do the trick? Or maybe we should pivot those lines outside the database before loading them?
    We are a bit lost. Any suggestion would be appreciated.
    Regards
    Edited by: [email protected] on Oct 29, 2008 8:43 AM
    Edited by: [email protected] on Oct 29, 2008 8:44 AM

    Yes, well, we could define a 1.000 column external table, and then map those 1.000 columns to the Pivot operator… perhaps it would work. But we have been investigating a little bit, and we think that we have found a better solution: there is a unix utility called “fold”. This utility can split our 30.000 character lines in 1.000 lines, 30 characters long each: just what we needed. Then we can load the resulting file using an external table.
    We think this is a much better solution that handling 1.000 columns in the external table and in the Pivot operator.
    Thanks for your help.
    Regards
    Edited by: [email protected] on Oct 29, 2008 10:35 AM

  • LoadUserProfile() creates a profile with Chinese characters on a remote system

    Hi,
    I'm working on an application where LoadUserProfile() is being used to remotely load a user profile on a machine. The token being passed to LoadUserProfile() is obtained from LogonUser(). 
    When doing this only with a Domain Admin user which is added in Active Directory, it creates a profile with Chinese characters in the C:\Users\ folder of the remote machine. Note that this happens only when logging in for the first time with
    this Domain Admin account remotely on that machine.
         // code:
          PROFILEINFO pi;
          memset((void *) &pi, 0, sizeof(PROFILEINFO));
          pi.dwSize = sizeof(PROFILEINFO);
          pi.dwFlags = PI_NOUI;
          pi.lpUserName = (TCHAR *)strUser;   //strUser is the User name, and it shows correctly here when debugging
          if (LoadUserProfile(hToken, &pi))
    //It is actually successful, and comes here when debugging.
    Although the name shows up correctly when debugging (remotely), why is it creating a profile with Chinese characters on the remote machine? 
    TIA,
    Jy

    CreateProfile won't load the profile.  You need to use LoadUserProfile to load the profile, and you need to query for a roaming profile path to put in the lpProfileInfo parameter if you want to include that as well.  You need a token for a
    user to call LoadUserProfile, but not a profile handle.  LoadUserProfile will populate that for you before it returns if it was successful.  See this excerpt from
    https://msdn.microsoft.com/en-us/library/windows/desktop/bb762281%28v=vs.85%29.aspx:
    Upon successful return, the hProfile member
    of PROFILEINFO is
    a registry key handle opened to the root of the user's hive. It has been opened with full access (KEY_ALL_ACCESS). If a service that is impersonating a user needs to read or write to the user's registry file, use this handle instead of HKEY_CURRENT_USER.
    Do not close thehProfile handle.
    Instead, pass it to the UnloadUserProfile function.
    This function closes the handle. You should ensure that all handles to keys in the user's registry hive are closed. If you do not close all open registry handles, the user's profile fails to unload. For more information, see Registry
    Key Security and Access Rights and Registry
    Hives.
    WinSDK Support Team Blog: http://blogs.msdn.com/b/winsdk/

  • GUI Download Issue with Chinese characters

    Hello,
    Currently we are upgrading from 4.7 to ECC. I'm using GUI_DOWNLOAD
    function module to download the data from SAP to desktop. I do have an
    issue with Chinese characters while downloading the file from SAP to ECC.
    In 4.7 the Chinese characters are being downloaded (I haven't used any
    code page) perfectly, but where as in ECC the downloaded file has junk
    characters instead of Chinese.
    Is there any change in the GUI_UPLOAD FM.
    For your reference below is the code present in the program
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
          FILENAME             = Z_FILENAME
    *****DCDK900543 - Begin of fixing for Unicode conversion ****
         FILETYPE             = 'WK1'
          FILETYPE             = 'ASC'
          WRITE_FIELD_SEPARATOR = ABAP_TRUE
    *****DCDK900543 - End of fixing for Unicode conversion ****
        CHANGING
          DATA_TAB             = I_TAB_TMP
        EXCEPTIONS
          FILE_WRITE_ERROR     = 1
          NO_BATCH             = 2
          INVALID_TYPE         = 3
          UNKNOWN_ERROR        = 4
          OTHERS               = 5.
    Regards,
    Bharath.

    Hi bharat,
    please check whether you ecc 6.0 is uni coded or not (as you upgraded).
    If it is not uni coded then you will not be able to print the Chinese characters.
    You can see whether it is uni coded or not by the following
    in your app toolbar under system click on status.
    There you can see whether your ecc6.0 is uni coded or not.
    Regards,
    koolspy.

  • How to use a select statement with chinese characters?

    I am currently developing a java servlet<using tomcat 4.x> which allows me to use select statement to retrieve results from the Microsoft SQL Server 2000 database. I am using a simple form to get the parameter for querying. The main problem i'm facing is that there are chinese information in the SQL database, but i can't retrieve it through the sql statement with the chinese characters input<thru the form with the help of NJ STAR>in the WHERE condition. When i execute the statement, it returns me no results even though the rows are present in the database.
    Does anyone have the solution to using chinese words in the WHERE clause of the select statement to retrieve results with columns which contains chinese characters? Please help me. Thanks everyone. :)
    PS: when i cut and paste those characters in the sql database and paste onto java.. it is ??? in questionmarks.. but when i paste them into excel 2000.. its shown as chinese chars again..
    please heelppp~~

    Greetings,
    PS: when i cut and paste those characters in thesql
    database and paste onto java.. it is ??? in
    questionmarks.. but when i paste them into excelThis is why the SELECT is not returning any results.
    You need to set the character encoding set on your
    statement and parameters for the characters to be
    properly translated. Refer to the charsetName
    parameter in the String class constructor in your API
    docs and also to
    $JDK_DOCS/guide/intl/encoding.doc.html in your JDK
    documentation.
    2000.. its shown as chinese chars again..Because Office programs are performing the same kind
    of character translation with the appropriate MS APIs.
    please heelppp~~Regards,
    Tony "Vee Schade" Cookis it possible for you to show me some coding examples? i don't really understand what is to be done in order to set the char set and what does it really do.. tried reading up but still dun understand.. :(
    pardon my shallow knowledge of java..
    ok..
    The thing is when i used an insert statement with chinese characters of GBK format hardcoded into the java servlet and then i use the insert statement to insert the chars into the database, it cannot be seen as a chinese word when i off the NJStar. and then it can be searched out with my current form of servlet.. below is my coding of the servlet..
    note: i've set my html file to charset = GBK
    //prototype of Search engine...
    //workable for GBK input and output...
    import java.io.*;
    import java.io.OutputStream;
    import java.io.IOException;
    import javax.servlet.http.*;
    import javax.servlet.ServletException;
    import java.util.*;
    import java.sql.*;
    import java.nio.charset.Charset;
    public class SearchBeta extends HttpServlet {
         private Vector musicDetails = new Vector();
         private String query = "";
         public void service (HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException, UnsupportedEncodingException {
              query = req.getParameter ("T1");
              System.out.println("before:"+query);
              String type = req.getParameter ("D1");//type
              query = req.getParameter ("T1");
              //query = "������";
              System.out.println("after:"+query);
              getResults(type,query);
              System.out.println("locale = :"+req.getLocale());
              res.setContentType ("text/html;charset=GBK");
              PrintWriter out = res.getWriter();
              out.println("<html>");
              out.println("<head>");
              out.println("<body bgcolor = \"black\">");
              out.println("<font face = \"comic sans ms\" color=\"Cornsilk\">");
              if (query.length()==0)
                   out.println ("Please key in your search query.");
              else if (musicDetails.size()==0)
                   out.println ("Sorry, no results matching your search can be found.");
              else {
                   out.println("<center>");
                   out.println("<table cellspacing = \"50\">");
                   int i = 0;
                   //Display the details of the music
                   while (i<musicDetails.size()) {
                        Results details = (Results)musicDetails.get(i);
                        String dbArtist = "";
                        String dbAlbum = "";
                        String dbTitle = "";
                        String dbCompany = "";
                        dbAlbum = details.getAlbum();
                        dbTitle = details.getTitle();
                        dbCompany = details.getCompany();
                        dbArtist = details.getArtist();
                        try{
                             dbAlbum = new String(dbAlbum.getBytes("ISO-8859-1"),"GBK");
                             dbTitle = new String(dbTitle.getBytes("ISO-8859-1"),"GBK");
                             dbCompany = new String(dbCompany.getBytes("ISO-8859-1"),"GBK");
                             dbArtist = new String(dbArtist.getBytes("ISO-8859-1"),"GBK");//correct translation.
                        catch(UnsupportedEncodingException e){
                             System.out.print(e);
                             e.printStackTrace();
                        String dbImage_loc = details.getImage();
                        out.println("<tr>");
                             out.println("<td><table>");
                                  out.println("<img src=C:\\Program Files\\Apache Group\\Tomcat 4.1\\webapps\\examples\\ThumbNails\\"+dbImage_loc+">");
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Artist: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbArtist+"</font></td>");
                             out.println("</tr>");
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Title: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbTitle+"</font></td>");
                             out.println("</tr>");
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Company: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbCompany+"</font></td>");
                             out.println("</tr>");
                             System.out.println("album: "+ dbAlbum);
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Album: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbAlbum+"</font></td>");
                             out.println("</tr>");
                             System.out.println("company: "+ dbCompany);
                             out.println("</table></td>");
                        out.println("</tr>");
                        i++;
                   out.println("</table>");
                   out.println("</center>");
              out.println("</font>");
              out.println("</body>");
              out.println("</head>");
              out.println("</html>");
              out.close();
              //to remove all the elements from the Vector
              musicDetails.removeAllElements();
         //get Searched Music Details and store in Results object which is stored in musicDetails vector
         public void getResults (String type, String searchQuery) {
              try {
                   Class.forName ("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=music","sa","kokkeng");
                   Statement stmt = con.createStatement();
                   String query = "SELECT * FROM MusicDetails WHERE "+type+" = '"+searchQuery+"'";
                   ResultSet rs = stmt.executeQuery(query);
                   while (rs.next()) {
                        String artist = rs.getString("Artist");
                        String title = rs.getString("Song");
                        String company = rs.getString("Company");
                        String album = rs.getString("Album");
                        String image_loc = rs.getString("Image");
                        Results details = new Results (artist,title,company,album,image_loc);
                        musicDetails.add(details);
                   stmt.close();
                   con.close();
              catch (Exception e) {
                   System.out.println(e.getMessage());
                   e.printStackTrace();
    with the above servlet i created, i can search out the data in the database which i've inserted through the insert statement. I still can't search for things i've keyed into the database directly using NJStar..
    thank you so much for helping.. really hope any one else who knows the answer to this will reply too... thank you all so much...
    -KK

  • Problems with Chinese characters

    I have a client experiencing 3 distinct problems with their Chinese-localized Fm files:
    The SimSun TTF font used in the source Fm files is "uninstalling" itself. This requires reinstallation of the font on a regular basis (every few days).
    The colons used in index markers in the Fm source files are not being parsed as Level1IX, Level2IX, etc. in the RoboHelp project. Instead, they are recognized as colons. In other words, the first level marker in Rh is XXXXXXXX:XXXXXXX:XXXXXXX. The same is true for the semicolons.
    The conversion settings for the Chinese project do not allow for mapping to individual CSS elements and classes. This means that all of the formatting is controlled via the supplemental CSS generated from the FrameMaker formatting. IOW, the formatting all uses the class="FM_ definitions.
    Has anyone had success working with Chinese characters in a FrameMaker to RoboHelp workflow (either linking or importing)?
    Anyone else seen any of these issues in Chinese or any other fonts?
    I'm thinking the first two issues are likely due to the TrueType font used, but can't find an Adobe OTF SimSans font to use as a replacement.
    However, the lack of mapping capability in the conversion process is a stumper...perhaps due to the double-byte font itself.
    Any thoughts or solutions are greatly appreciated by my client (whose deadline passed yesterday!)
    -Matt

    I dont think you can print chinese chars at the console on window
    to print the character codes to the console use someting like that
    char [] chars = request.getParameter("whatever").toCharArray()
    for(each chars){
    System.out.println((int)chars);
    then check if you got the corresponding chinese char

  • Emails arriving with Chinese characters

    Hello,
    I have a couple outside contacts that send emails to my users regarding travel. Flight itineraries and the like. Those emails usually have a PDF attached. Not sure if that is relavent or not. The emails display in my users Outlook client (2010) with Chinese
    characters and some other odd characters (like a smiley face and hearts).
    The research I've done points at the senders email server having the root issue. Perhaps they just had a patch applied and it changed the locale or they may be using a Lotus Notes server.
    Lately, we've been getting more in from another outside source with the same problem, so I'm wondering if it isn't actually on my Exchange server (2007). Does anyone have an idea of what I could check to verify that this is or is not on my end of the pipe?
    TIA

    Hi,
    According to your description, I recommend you use pipeline tracing to troubleshoot the issue.
    Please refer to the following article to understand pipeline tracing:
    Using Pipeline Tracing to Diagnose Transport Agent Problems
    Pipeline tracing is a diagnostic feature in Microsoft Exchange Server 2007 that enables you to capture diagnostic information about e-mail messages as they encounter transport agents registered on Simple Mail Transfer Protocol (SMTP) events in the transport
    pipeline. Exchange captures verbose information about the changes that each transport agent applies to messages in the transport pipeline in message snapshot files. If transport rules are configured, Exchange Server also records any actions that each transport
    rule takes on these messages.
    How to Enable Pipeline Tracing
    Hope this helps!
    Thanks.
    Niko Cheng
    TechNet Community Support

  • CF10 HF8 monitor appears with chinese characters

    Help: What happend? After applying HF8 to CF10, the monitor app appears with chinese characters .... of course exactly when I needed it urgently
    where can I influence that? Note, the entire CF Admin is as usual in english.
    Thsnks
    Martin

    Have you tried doing it through a GUI? :-)
    Fire up the Gnome File Manager under start (the coffee cup),Places and then find the file and trash or delete it.
    Something a bit more onerous would be to copy all of the files except for the offending file someplace else and then go up to the parent directory and just do an rm -r sub-directory.
    alan

  • How to create flat file with fixed lenght records

    I need help to export an Oracle table to a flat file with fixed lenght and without columns separator.
    the fixed length is the more important demand.
    My table have 50 columns with varchar, date and number .
    Date and number columns may be empty, null o with values.
    Thanks a lot for any help.
    [email protected]

    Hi,
    You can use this trick:
    SQL>desc t
    Name                                      Null?    Type
    NAME                                               VARCHAR2(20)
    SEX                                                VARCHAR2(1)
    SQL>SELECT LENGTH(LPAD(NAME,20,' ')||LPAD(SEX,1,' ')), LPAD(NAME,20,' ')||LPAD(SEX,1,' ') FROM T;
    LENGTH(LPAD(NAME,20,'')||LPAD(SEX,1,'')) LPAD(NAME,20,'')||LPA
                                          21                    aF
                                          21                    BM
                                          21                    CF
                                          21                    DM
    4 rows selected.
    SQL>SELECT *  FROM t;
    NAME                 S
    a                    F
    B                    M
    C                    F
    D                    M
    4 rows selected.Regards

  • How to load a flat file with lot of records

    Hi,
    I am trying to load a flat file with hundreds of records into an apps table. when i create the process and deploy it onto the console it asks for an input in an html form. why does it ask for an input when i have specified the input file directory in my process? is there any way around tis where in it just reads all the records from the flat file directly??is custom queues anyway related to what I am about to do?any documents on this process will be greatly appreciated.If any one can help me on this it will be great. thank you guys....

    After deploying it, do you see if it is active and the status is on from the BPEL console BPEL Process tab? It should not come up to ask for input unless you are clicking it from the Dashboard tab. Do not click it from the Dashboard. Instead you should put some files into the input driectory. Wait few seconds you should see the instances of the BPEL process is created and start to process the files asynchrously.

  • How to load a flat file with utf8 format in odi as source file?

    Hi All,
    Anybody knows how we can load a flat file with utf8 format in odi as source file.Please everybody knows to guide me.
    Regards,
    Sahar

    Could you explain which problem are you facing?
    Francesco

  • How to generate blank spaces at end of the record in a flat file with fixed

    Hi,
    I am generating a flat file with fixed length.
    In my ABAP program, i am able to see the spaces at the end of the recors in debug but when download to applicaiton server i am not able to see those spaces.
    How can i generate blank spaces at the end of the record in a flat file?
    Please update
    Thank you

    How are you downloading the file?  And, How are you looking at the file on the application server?
    Can you provide snippets of your code?
    Cheers
    John

  • How can I see file with chinese name in Sunray USB storage?

    hi, All
    I installed Sunray4u3 on Solaris0805. the application server is win2003EE.
    I accessed usb storage from win2003, but I can only see files with English name , and could not see files with chinese name. Why? who can help?
    best regards
    xiong wei

    You might want to make sure your credit card is listed in the billing information associated with your Apple ID (see http://support.apple.com/kb/ht1918).
    Also, to change the From name that appears when you address emails on and iOS device, go to Settings>Mail,Contacts,Calendars...tap your iCloud email account, tap you iCloud account at the top, tap Mail at the bottom, then enter the name you want to use in the Name field at the top.
    To change the From name on your Mac Mail, go to icloud.com, sign into your account, open Mail, click the gear shaped icon on the bottom left and choose Preferences, go to the Accounts tab and enter the name you want to use in the Full Name field and click Done.  Then quit Mail on your Mac and re-open it.  Your new From name should now appear in the drop-down list when you compose a new email.

  • Infospoke  flat file with tab seperator

    Hello,
    I have a infospoke which creates a flat file with comma field separator. I would like to have tab character as a field seperator. How would I change it.

    Varun,
       as Ram told you can give ',' as Separator.
    all the best.
    Reagrds,
    Nagesh Ganisetti.

Maybe you are looking for

  • Hyperlinks on master pages not working after distilling (InDesign CS4)

    Hello, We have started using weblinks in the PDF versions of my print magazine. As PDFs exported in InDesign are bloated, we use this workflow for creating the PDF issues: Export print-ready PDFs of layouts in InDesign CS4 (Mac) Combine PDFs into a s

  • GPS Applicatio​ns

    I was wondering if anybody had read from a serial port a GPS receiver.In particular I wondered if they had read NMEA strings? Tom

  • Scan Image For Restore Question...

    So I made a backup image of my HD. After running "Scan Image For Restore" this is what showed up in console... Mar 16 17:15:38 localhost authexec: executing /usr/sbin/asr Mar 16 17:23:19 localhost diskarbitrationd[87]: disk2s2 hfs 3ABFFEEC-D371-3B4A-

  • Deploy 9i Forms without Application Server ?

    I wonder, whether I could deploy a Forms 9i Application without the use of the Application Server. Can anybody tell me, whether it is necessary to purchase any Oracle 9i Application Server licences, just because I want to deploy a simple Forms 9i app

  • I recently upgraded from a Droid X to the LG Spectrum 2. Why can I not send messages?

    I recently upgraded to a LG Spectrum 2 and have been having trouble sending messages. It either takes a REALLY long time to send a message or it doesn't send at all. It seems I had better service with my old Droid X. Does anyone know why the slow mes