6 Replies Latest reply on Oct 28, 2016 7:21 AM by TSGal

    FM Should clean paste and import commands of illegal character eg 0x00

    miltenb

      LS,

       

      This is an invoice with Calibri font size 11. The cause of this is a user pasting data into a field with the 0x0 character in it.

      A character like this will also cause xml-exports to fail.

       

      Change the font to Arial and the invoice prints perfectly.

       

      FM should catch pasting and importing of these characters as ordinary user will just freeze up when they see this. The character can be seen in the FM field als an invisible double space.

       

      Took me several hours to find the cause of this issue.

       

      Kind regards.

       

      Joost Miltenburg, The Netherlands

      20161567_0x0.png

        • 1. Re: FM Should clean paste and import commands of illegal character eg 0x00
          beverly

          you have posted to Community Feedback - a place to discuss this forum's functions and software (JIVE).

           

          if you believe this is an error/bug, post (or move it here):

          Report a Product Issue

          there may be similar posts and TSPigeon or TSGal can help you

           

          if you believe this is up for discussion:

          Discussions

          post for more people to see the discussion (or question)

           

          if you believe this is behavior (not a bug), but would like to change in future products:

          Product Ideas

          search for similar ideas and vote or create a new idea

          beverly

          • 2. Re: FM Should clean paste and import commands of illegal character eg 0x00
            TSPigeon

            miltenb:

             

            Thank you for your post!

             

            If you could provide a little more information:

            -What Operating System is this occurring on? (Mac OS X 10.12.1, Windows 7 Professional SP1, etc.)

            -What version of FileMaker Pro are you using? (14.0.2, 15.0.2, etc.)

            -Could you provide a sample of text and steps to reproduce the issue?

             

            I am also going to move this thread from the FileMaker Community Feedback Space, which is specifically for input on the Community itself, to the Discussions Space where you should receive more views and potentially more feedback on this topic!

             

            TSPigeon

            FileMaker, Inc.

            • 3. Re: FM Should clean paste and import commands of illegal character eg 0x00
              philmodjunk

              We often resolve issues with pasting "messy text" into a FileMaker field with an auto-enter calculation. Something like this:

               

              TextFormatRemove ( Filter ( Self ; "AcceptableCharactersInBothUpperandLowerCaseGoesHere" ) )

              • 4. Re: FM Should clean paste and import commands of illegal character eg 0x00
                miltenb

                We see this in FM14v4 and FM15v1/v2.

                On Mac 10.11 & 10.12

                On PC Win10

                 

                Text sample : ( faulty character is at the second position after Cosun, but maybe pasting in safari has fixed it. ) ( see red thingy/character at the end of the text ). Apparently there is a whole bunch of these characters.

                Screen Shot 2016-10-27 at 21.18.26.png

                Hierbij wordt factuurnummer 20160973 gedeeltelijk gecrediteerd. Wij zullen dit bedrag terugstorten op bankrekeningnummer NL55 RABO 0101 0507 55 t.n.v. Cosun 

                 

                This character is a cause of FM exports failing with xml/xslt since FM6, so this has been a long time fixing.

                Usually I replace this character with help of the Troi File Plugin where I can do a substitute like this:

                substitute calculation :

                Let (

                [

                c1 = TrFile_AsciiValueToText ("-Unused" ; "0x00")

                ]

                ;

                Substitute (

                $fieldContents ;

                [ c1  ; ""]

                )

                )

                • 5. Re: FM Should clean paste and import commands of illegal character eg 0x00
                  user19752

                  Filter() function is not applicable for CJK language, that should allow too many characters. (Sorry I hadn't tested making custom function and how does it effect on performance.)

                   

                  I think this is issue.

                  Another thing is

                  Char(0) returns an empty string (“”).

                  Regarding this, FMI might think text shouldn't have null character in it, so pasted/imported values are expected auto correct as OP wrote.

                  Or, if null characters are kept in text value, Char(0) should return null character instead of empty string. So that we can easily remove (or add) it if we want.

                  • 6. Re: FM Should clean paste and import commands of illegal character eg 0x00
                    TSGal

                    user19752:

                     

                    At this time, there is no difference between empty and null in FileMaker Pro when it is returned as the result of the Char function.  If you want to check for the null character and remove it, use a calculation like:

                     

                    Substitute ( <text string or field> ; Base64Decode ( "AA==" ) ; "" )

                     

                    TSGal

                    FileMaker, Inc.

                    2 of 2 people found this helpful