Extra character(a square box) at the end of data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • user1980
    New Member
    • Dec 2009
    • 112

    Extra character(a square box) at the end of data

    I am not sure if this is the correct forum for this question....so moderator please feel free to move this to the appropriate forum..thank you

    Now coming to my issue...I have an application from which I pull data and then upload the data into the database.. This is very huge data and I do it almost 8 to 10times a day..the data I download from the application when uploaded into the database gives an extra character which is a square box at the end of data in few columns...curre ntly what I do is, download the data as a .txt file and open in it notepad and then save it and then upload it into database...by opening and saving in it notepad..it somehow gets rid of the that extra square box.....

    please find the attached file..you can open in it in word pad to view the square box..

    can somebody please tell me how can I get rid of the square box or is there a way to automate the process of opening and saving the file in notepad...thank you
    Attached Files
  • Studlyami
    Recognized Expert Contributor
    • Sep 2007
    • 464

    #2
    The square box usually has to do with line returns in windows /r/n. What application are you using to open the file initially? Is this your code? Do you have access to the source files and can you modify them? When you parse your text file search for the /r from the string and remove it or try the same with /n. I have hit this all the time while working with files, just mess around with your carriage returns and that box will be gone.

    Comment

    • user1980
      New Member
      • Dec 2009
      • 112

      #3
      thank you for the reply.....I can not modify the source code as the application is a third party application. i will try to see if I can do any thing else to remove the /r or /n from the data..thank you

      Comment

      • Studlyami
        Recognized Expert Contributor
        • Sep 2007
        • 464

        #4
        Perhaps you could expand more the entire process and applications involved in this process and perhaps we can help you find an acceptable solution. Perhaps contacting the creators of the program and see if 1 there is an update for the software or two see if there is something you can do to fix the problem. From a programmers standpoint it is easy to fix this problem.

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #5
          I see nothing wrong with the line terminators in that file, they are correct for windows (\r\n and not just \n) and they are in the correct order.
          There *IS* however a null byte in between the two tab characters.
          0x09 0x00 0x09 (tab, null byte, tab) which is causing the box.
          Probably used as a split point in the application that created it, or something strange in the way you retrieve the data

          Comment

          • user1980
            New Member
            • Dec 2009
            • 112

            #6
            thank you both for the responses...I will try to see how my data is being extracted.. i mean look into the code..if possible...or ask the provider to help me ..thanks for shedding light on what to look for...

            Comment

            Working...