UNICODE Problem when Download to TXT/ASC file.

Dear Experts,
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, the field ,length 10, contained Characters, is displayed 10 chinese characters(that's 20 bytes in txt file). It causes the displayed field length are varied between the definition length of field and the actual output.
ex.
102’†•¶ŽšŒ^‘ª00012345       --> the output I actully want.
102’†•¶ŽšŒ^‘ª     000012345  --> unicode makes this in txt file, lenth 10, fill 5 characters but still leave 5 space.
How to make system take the chinese characters as 2 bytes when download....or any other better idea for this?
anyone who can solve this, that's life saving..!!!
thanks in advnace.

Sorry, the chinese chararcters cannot display properly,
so just assume each '@' as a chinese character. Five chinese Characters should occupy whole field length(10),
but Unicode makes it like line 2, still leave 5 space culomn behind(using  to represent the empty column).
ex.
102@@@@@00012345      --> the output I actully want.
102@@@@@000012345 -- the actual output.
thanks.
Message was edited by: Ching Heng Ling

Similar Messages

  • UNICODE Problem when Download/Upload from ASC file.

    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, the field ,length 10, contained Characters, is displayed 10 Chinese characters(that's 20 bytes in txt file). It causes the displayed field length are changed.
    ex.
    text = '12@@@@@00012345'.
    text = text+0(12) --> display '12@@@@@' the output I actually want.
    text = text+0(12) --> display '12@@@@@00012' Unicode makes this in txt file,
    the Chinese characters cannot display properly, so just assume each '@' as a Chinese character.
    How to make system take the Chinese characters as 2 bytes when download....or any other better idea for this?
    anyone who can solve this, thanks in advance.

    Hi Prashant and Uwe,
    Thanks for your help. I used 'GUI_UPLOAD', but it still doesn't work.
    'Text1' still equal to '12@@@@@00012' , not '12@@@@@'
    My test problem as below:
    data: l_file type string.
            text1(20) type c.
    DATA: BEGIN OF T_FICH OCCURS 0,
             LIGNE(5000),
          END OF T_FICH.
      l_file = P_SOURCE.
      CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
                FILENAME            = l_file
               FILETYPE            = 'ASC'
               HAS_FIELD_SEPARATOR = 'X'
               Read_By_Line        = 'X'
                CODEPAGE            = '8400'
           TABLES
                DATA_TAB            = T_FICH
           EXCEPTIONS
                OTHERS              = 99.
    LOOP AT T_FICH.
       text1 = T_FICH-LIGNE+0(12).
    ENDLOOP.
    Could you give me some advise about this?

  • Problems when downloading VSD or PPM file types

    Hi,
    when we try to download fiels from collaboration server, getting the SSL prompt when trying to download either VSD or PPM file types, all other open just fine.
    Did any comeacross such kind of problem and any workaround.
    Thanks,
    Ramesh

    I'm not sure you both have the same problem, but Mario's may be caused by this:
    When you open an Office doc (Word, Excel, probably others) via HTTP from the appropriate application, Office 2000 and later check to see if the HTTP URL is WebDAV enabled. When you close the document, it makes the WebDAV/HTTP request back to the server to see if it can write changes to the document back to the original. If you have Windows Auth or Basic enabled on the site (even if anonymous is also enabled), and you are not logged into the domain, it's likely that you will get the prompt).

  • Problem when I upload txt files to the server

    Hi, I have a problem when I try to upload files to the server, and I can't understand the fail.
    My case is:
    I have a jsp page where a from is.
    This form is sended to a servlet that proccess its content and upload the attach file to the server.
    It works correctly (it uploads the files, txt, xls and csv), the problem is when I try to upload a txt file like this, for example:
    Depth     Age
    0     0,1
    2     0,9
    3     2
    5     6
    6     9
    8     12
    34     25
    56     39
    101     40When I verify the uploaded file, this one has a character extra of return of line (a small square). This character prevents me from working then correctly with the file, on having detected a column of more.
    Which can be the problem?
    The code I use to uploaded the file is:
    try
        MyConnection Objconnection = new MyConnection();
        boolean isMultipart = FileUpload.isMultipartContent(req);
        // Create a factory for disk-based file items
        FileItemFactory factory = new DiskFileItemFactory();
         // Create a new file upload handler
        ServletFileUpload upload = new ServletFileUpload(factory);
        // Set overall request size constraint
        upload.setSizeMax(1024*512); //524288 Bytes (512 KB)
         // Parse the request
        List items = upload.parseRequest(req);
        // Process the uploaded items
        Iterator iter = items.iterator();
        String dat = new String();
        String typeFile = new String();
        while (iter.hasNext())
            FileItem item = (FileItem) iter.next();
            if (item.getFieldName().equals("typeFile") )
                typeFile = item.getString();
            if (!item.isFormField())
            String fieldName = item.getFieldName();
            String fileName = item.getName();
            String contentType = item.getContentType();
            boolean isInMemory = item.isInMemory();
            long sizeInBytes = item.getSize();
            int numbers=0;
            for(int i=fileName.length();(i=fileName.lastIndexOf('\\',i-1))>=0;)
                 numbers++;
            String stringFile[] = fileName.split("\\\\");
            HttpSession session = req.getSession(true);
            String loginSesion = (String)session.getAttribute("UserLogin");
            String newUserFolder = loginSesion;
            File createFile = new File("/usr/local/tomcat/webapps/Usuarios/FilesUp/"+newUserFolder);
            if ("AgeModel".equals(typeFile))
                createFile = new File("/usr/local/tomcat/webapps/Usuarios/FilesUp/AgeModels/"+newUserFolder);
            if (!createFile.exists())
                createFile.mkdir();
            fileName = stringFile[numbers];
            File uploadedFile = new File("/usr/local/tomcat/webapps/Usuarios/FilesUp/"+newUserFolder+"/"+fileName);
            if ("AgeModel".equals(typeFile) )
                uploadedFile = new File("/usr/local/tomcat/webapps/Usuarios/FilesUp/AgeModels/"+newUserFolder+"/"+fileName);
            existe = Objconnection.existFile(fileName, typeFile, loginSesion);
            if ( true == existe )
                 exito = false;
            else
                item.write(uploadedFile);
                ....// NOW REGISTER THE FILE IN TH DATA BASE
        } // if (!item.isFormField())
    } // WHILE ( iter.hasNext() )
                catch(Exception e) {
                out.println("Error de Aplicaci�n " + e.getMessage());
                return exito;
    ...THANKS

    Hi,
    Sorry I am aware this question was posted way back, but I am having similar problem and haven't been able to find the fix yet.
    So please let me known if you have got any ideas.
    My problem is same that I have to upload a CSV file from Client Machine (Windows) to Unix Application Server.
    I am using JSP method post and multipart/form-data (as in http://www.roseindia.net/jsp/file_upload/Sinle_upload.xhtml.shtml).
    The file is uploaded fine but the problem is it displays carraige Return (^M) a square boxes on Unix file.
    I can't ask user to convert file to Unox format before uploading. They just convert excel file to CSV and upload.
    Is there any way I can get rid of these characters as I have to use this file further.
    Sorry, I can't use any paid utility or tool for it.
    I would appreciate if you could please help.
    Thanks,
    SW

  • TS5179 I've been bitten by the "Missing MSVCR.dll file" problem when downloading the latest iTunes update (PC w/ Win-7 & Outlook-2007#. 'Have followed Apple's instructions of un-installing all Apple software, and re-installing it. #out of space...??)

    I've been bitten by the "Missing MSVCR.dll file" problem when downloading the latest iTunes update, 11.4.62 (on a PC w/ Win-7 & Outlook-2007#. 'Have followed Apple's instructions of un-installing all Apple software, and re-installing it (Ugh).  First result Outlook couldn't find my 1,385 item contact file in iCloud, although the outlook distribution lists were there.  Second result, upon installing iCloud again, I have two iCloud contact files shown in outlook - "iCloud" & iCloud, within iCloud".  1,332 & 1,385 contacts respectively. 
    Plus an iCloud installation error message saying iCloud moved 6,835 files to a "deleted items folder" somewhere.  This is NOT fun at 72-yrs old...!!
    So, how do I make sure I haven't lost anythying from Outlook?   Russ-AZ

    Interesting response, Kappy  -  Back to original post: "First result: Outlook couldn't find my 1,385 item contact file in iCloud, although the outlook distribution lists were there (therefore, initially I had lost my contact file from Outlook).  Second result, upon installing iCloud again, I now have two iCloud contact files shown in Outlook - "iCloud" & iCloud, within iCloud".  W/ 1,332 & 1,385 contacts respectively.  
    Plus an iCloud installation error message saying iCloud moved 6,835 files to a "deleted items folder" somewhere.  This is NOT fun at 72-yrs old...!!
    So, how do I make sure I haven't lost anythying from Outlook?   Russ-AZ"
    You can safely assume that I have tried using it!   So, to make things a little clearer:
         1)  I now have two iCloud "contacts files", w/ a different total count. What's the difference?  Why the different toatl count?
         2)  Since re-installing the Apple software (part of the MSVCR" recovery instructions) "couldn't possible affected Outlook", why am I getting an iCloud installation error message saying iCloud moved 6,835 files to a "deleted items folder" somewhere.  What's in those files? And where are they?
    Probably more important questions get down to:
         3)  Why is a basic Apple product upgrade "screwing-up Outlook"?  This iTunes upgrade, failing to install properly forced Outlook 2007 into a 2-min start-up cycle.  Which was fixed with this "Goat-Rpdeo" of re-installing MSVCR80.dll.
         4)  And under the latest release of iOS-7.0.4 on our iPhones, why is Apple now forcing us to use the iCloud to back-up our contacts, calendars & tasks, vs. allowing these files to be backed-up directly on our PC's via the USB cable?
    Thanks again for your interest and comments.  - Russ-AZ

  • Why can I not print out a pdf-file (train ticket NS) when downloaded with Firefox? (file says (SECURED)

    When ordering and paying a train ticket by internet they send a pdf-file, which one must download and print. When downloading this with Firefox (from my e-mail account) the pdf-file says (SECURED) and I cannot print out the ticket (pdf-file). (Adobe program stops automatically).
    When downloading this same pdf-file in Safari, I encounter no problems.

    Current Firefox versions have enabled a built-in PDF Viewer that doesn't have all features that other PDF readers like the Adobe Reader have or may not function properly otherwise.
    You can change the action for Portable Document Format (PDF) from Preview in Firefox to use the Adobe Reader application or set to "Always Ask" in "Firefox > Preferences > Applications".
    *https://support.mozilla.org/kb/change-firefox-behavior-when-open-file
    See also:
    *https://support.mozilla.org/kb/view-pdf-files-firefox-without-downloading-them

  • Windows 8.1 account limit problem when downloading from store

    windows 8.1 account limit problem when downloading from store        
    I have 250 windows 8.1 tablets.
    I figured since you can use the same account on 81 devices id create 4 accounts.
    I need to download more than 25 free apps from the store
    on each tablet. Putting the same account don't work. (comes up with an error after putting on to many devices that you cant use this account now).
    Whats the best way to do this ? and what if I need to download a paid app ?
    Thank You.

    Hi,
    As far as I know, One Microsoft Account may bound at most five Trusted computers. There is no way to break this limitation.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Why does Acrobat Pdf converter file slow down my 2003, Windows  Word Program.  I only experience this problem when i convert a pdf file to a doc file.

    Why does Acrobat Pdf converter file slow down my 2003, Windows  Word Program.  I only experience this problem when i convert a pdf file to a doc file.

    Hi Bill -- thanks for your reply!
    When I check the Document Properties on Acrobat I can see that the fonts used in the document (Cambria, Times and Windings) are listed as "Embedded Subset" in the Fonts panel. The machine it was created on did use an earlier version of OS X and an old version of Word, but it seems to have the proper fonts...
    -nick

  • Problem when downloading the JAR file

    I'm just install JRE and testing my first applet application. I'm facing the problem that I can not download the JAR file from my localhost computer.
    I've enable cache in Java Control Panel and running my applet. Normally, it will download the jar file from my localhost and save it to the cache directory of Java. And then finding all classes neccessary to run my applet in the JAR file.
    But I discover that I can not download the JAR file and save to my computer. I try to put the URL to download this JAR file (http://localhost/myjar.jar) in my web address, it start to download this file properly. But when open it with WINRAR, I got an error that the file "Unexpected end of file".
    I try to put this file from onther computer in my LAN. And use the URL to download it. This time I can open the JAR file with WINRAR althrought the file size is the same
    Anyone know why there are some errors when download from my localhost? Thanks in advance for any help!!!

    Yeah everything matches up!
    Could it have something to do with the string encoding? I created the file in ANSI format? Would this have an effect on it?

  • Problem for downloading Weather client.jar file

    Hi,
    I downloaded Weblogic server6.1 windows version.my system enveronmet is:Compaq system
    with 20GB and 128MB Ram
    OS is windows-98.Iam able to run server and compile and create example Weather.ear
    file.but iam geting problem when iam try to download Client.jar from this URL:http://host:port/weather
    here i change host is my system name and port is 7001 like what ever you given instruction
    in document.but it's not opning that file it's giving error that error message I
    attach with this message.this is my problem please tell me how to solve this problem.
    Thanking you
    seenu
    [att1.html]

    I would like to know too. I am a newbie on this matter as well. I am curious about the RUNCLIENT. Can I use java <className that references the EJB>?

  • When downloading and opening a file through Firefox 5 on a Windows 7 machine, files are downloading and opening as read-only.

    I am trying to download an attachment from gMail. When I select download, I can open or save as the document. If I select "open", it opens the file, but makes it read only.
    If I do this exact action in IE8, it opens the document normally.

    Unfortunately, I have not found a solution for this problem yet.
    But I did find out, that Safari only crashes, when I choose a "custom" location to save the file at. When I simply click on Download to "Safari Downloads", it keeps working perfectly.
    So it seems to be a problem with the choosing of a file location.
    Does this give anyone an idea what else I could try?

  • Safari crashes when downloading or uploading a file on Windows 7

    Since a couple of days, whenever I try to download or upload a file through Safari (5.1.7) on Windows 7.
    I thought it could be a problem with the recently released iCloud 2.0, since the problem started to occur right around the time iCloud updated.
    So I already tried to repair Safari and completely reinstalled Safari as well as iCloud. But Safari keeps crashing every time.
    Since this is really annoying, I am hoping that someone here maybe has another idea about how to fix this.
    Here is the error message, by the way:
    Microsoft Visual C++ Runtime Library
    Runtime Error!
    Program: C:\Program Files (x86)\Safari\Safari.exe
    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.
    Thank you for your help!
    PS: Talking about Safari on Windows, when is Safari 6 coming to Windows users? Or better yet, when is the 27" iMac hardware refresh, so I can finally make the switch over to Macintosh?

    Unfortunately, I have not found a solution for this problem yet.
    But I did find out, that Safari only crashes, when I choose a "custom" location to save the file at. When I simply click on Download to "Safari Downloads", it keeps working perfectly.
    So it seems to be a problem with the choosing of a file location.
    Does this give anyone an idea what else I could try?

  • When downloading or uploading a file, browsing slows to a crawl

    Since upgrading to 10.5.5, whenever I'm downloading or uploading a file (via Firefox, Safari, Interarchy, iTunes or Unison - it makes no difference), my web browsing slows to a crawl. If I pause or stop the upload or download, browsing returns to normal speed. If I restart the upload or download, browsing slows to a crawl again.
    By "slows to a crawl", I mean the browser will perform the DNS lookup, then hang on "Waiting for xxxx" or it will load some of the page, but not the style sheet, etc etc, and then time out.
    I have run the DNSChanger Removal Tool and it didn't find anything.
    Anyone else having this experience?

    Unfortunately, I have not found a solution for this problem yet.
    But I did find out, that Safari only crashes, when I choose a "custom" location to save the file at. When I simply click on Download to "Safari Downloads", it keeps working perfectly.
    So it seems to be a problem with the choosing of a file location.
    Does this give anyone an idea what else I could try?

  • Hang when downloading the windows support files.

    My iMac stop dowloading the windows support files at about 20% when
    i was installing Window 7 on my iMac 21".
    I leave the download over night and same thing at about 20%.
    I tried this over 2 nights and the same thing.
    This would not have happen if LION comes with a DVD.
    I think Apple is trying to discourage Mac users from using Window 7?

    I had the same problem. I searched all over the internet and could not find a place to manually download the Boot Camp 4.0 Windows 7 support files.
    I have now managed to get everything working by getting Apple staff to manually provide the files to me on a usb disk.
    I've uploaded the files here: http://www.sekara.com/download/WindowsSupport-Bootcamp4_drivers.zip
    When the zip file has finished downloading, extract all the files into a usb disk and proceed installing Windows 7 via Boot Camp 4.0 without downloading the support files.
    Once Windows 7 is installed, open your usb disk (within Windows 7) and install the support files. After the support files have been installed, Windows 7 will recognise all the hardware and start working correctly.

  • Problems when downloading a podcast

    Hi,
    I need help on what to do when I get a error message when downloading a podcast. To be specific, the Mad Money Jim Cramer's Podcast.
    When I try to download the podcast, the message that appears is: "There was a problem downloading, Authorization is needed to access, http://release.theplatform.com/release/content.mp4?pid=JY98jfsO...."
    How can I fix this??

    i tried going to the website and it tells me tha the media is not available. then i tried going the the main website (http://release.theplatform.com/) and it asks me to login with a user name and password. so, if you are trying to download the podcast from this link it is probably not available anymore.

Maybe you are looking for

  • Leave Maximum size for messages at default 10MB?

    Is that a best practice? 10MB seems small since it as been that size with us for at least 5 years and file sizes and mailboxes are getting larger. I wonder about the time wasted finding other ways send files to external users that may be any size fro

  • Use dynamic configurations inside an abap proxy

    Hi, is it possible to set dynamic configurations inside an abap proxy? Inside an abap-mapping I can use "CALL METHOD DYNAMIC_CONFIGURATION->SET_RECORD". What's up with an abap proxy? Regards Wolfgang Hummel

  • GEN_KEY and FROM_KEY of RFC_GET_TABLE_ENTRIES

    Hi there, I am using JCO java connector in my own client application to talk to SAP. I need to use RFC_GET_TABLE_ENTRIES to read table entries. Just wondering if anyone knows how to use GEN_KEY and FROM_KEY of this function to narrow the table read a

  • Firefox browser must be refreshed to log into and log out of Simple Machine Forum. No other browser does this.

    I run a Simple Machines Forum (SMF) Whenever I log in or out of my forum using Firefox (Ver 4.0.1) my browser gets "hung up." As soon as I type username, password, and hit enter the forum goes to a white screen that just sits there. To force the page

  • Applet loading and using ttf font

    Hello, I'd like my applet to load a TTF file from the server (or from a provided jar file) and use it to render text, or use it with GUI elements like TextArea. Here the significant part of my code:         URL fontURL=applet2.class.getClassLoader().