3 Replies Latest reply on Aug 24, 2012 2:17 PM by philmodjunk

    finding foreign characters in a field

    mattb

      Title

      finding foreign characters in a field

      Post

      (I'm using FMP11 Advanced for Macintosh)

      I have fields in a table that contain CHAR(196) characters - screenshot attached.  I would like to be able to use the Find function to locate instances of this character wherever they are in the table.  How do I do this?  

      CHAR%28196%29.png

        • 1. Re: finding foreign characters in a field
          philmodjunk

          Manual finds or scripted?

          In a script you can use set field with Char ( 196 ) to put the character as search criteria into a field.

          Manual searches using such characters gets a bit trickier.

          • 2. Re: finding foreign characters in a field
            mattb

            Manual finds or scripted?

            In a script you can use set field with Char ( 196 ) to put the character as search criteria into a field.

            Manual searches using such characters gets a bit trickier.

            ----------------------------------------------------------------

            Phil:

            Ultimately what I need to do is use a script to find this character (actually 3 characters as shown in the screenshot:  the comma, the char(196) and whatever char() the next character turns out to be) wherever they appear in the table and replace them with a single character, that being the single quote or apostrophe:  (').  How would you suggest I go about doing this?  I'm doing an XML data conversion project into FMP and this is the way the data comes in.  Thanks...

             

             

            Matt B.

             

            • 3. Re: finding foreign characters in a field
              philmodjunk

              Try using Replace field contents with this calculation:

              Substitute ( YourTable::TextField ; "," & Char ( 196) & Char ( 212 ) ; "'" )

              That updates a single field across all records in your table.

              If you have this to fix in multiple fields, you can probably use

              Perform Find/Replace in a script to do that. You'd use "," & Char ( 196) & Char ( 212 ) as the replace text and "'" as the replace with text.