Menu

Base64 encoded text

Developer
Aris
2004-09-22
2013-05-20
  • Aris

    Aris - 2004-09-22

    There is no inherent base64 support in TinyXML, as far as I can tell.  So, when there is a really large base64 encoded "attachment", it gets output as one very very long line.  This is causing a problem with an importing utility from Lotus Domino called DXLImport.  I have a patch that has solved this issue by cutting up the text into 80-char lines, somewhat similar to what MSXML does, I believe.  Would this be something that should go into the mainline code?  If so, could someone point me to some instructions for submitting a patch through SourceForge?  I've never done this before.

    Thanks.

     
    • Ellers

      Ellers - 2004-09-22

      I think base64 encoding/decoding code is useful but should not be part of the core TinyXml code. Not everyone needs it. It can used from some some extra lib no probs (there's surely something for that around already?)

      As for patches, see this thread
      http://sourceforge.net/forum/message.php?msg_id=2581042

      HTH :)
      Ellers

       
      • Aris

        Aris - 2004-09-22

        I don't mean that we should add support for encoding or decoding base64 into TinyXML, I agree that it doesn't make sense.

        What I am concerned about is that very very long text lines are created by TinyXML which some XML parsers apparently can't handle.  MSXML automatically cuts up very long lines which works well for these cases.

         
        • Ronald Fenner Jr

          Actually I don't think TinyXml needs a patch for this problem. If i remember right any line return should be preserved between the XML tag thus what ever function generated the encoded data did so as one long string.
          You can get around this inserting line returns yourself before storing the string in the XML file.

           
          • Aris

            Aris - 2004-09-23

            Nope, even if the input has new lines, when it is output, the new lines are gone.  The line returns are not preserved, this was the case which I needed to solve.

             
    • Lee Thomason

      Lee Thomason - 2004-09-26

      Newlines are a good feature for the Print() method. Add an item to the ECR to make sure it gets tracked!

      thanks,
      lee

       
      • Aris

        Aris - 2004-09-27

        I searched but I couldn't figure out what the ECR is...  Someone help?

         

Log in to post a comment.

MongoDB Logo MongoDB