7 Replies Latest reply: May 12, 2012 6:36 AM by [Jongware] RSS

    <FEFF> changes the line endings - Is this a BUG?

    Green4ever Community Member

      Hi All,

       

      (I am doing this by java script)

      I am inserting hyperlink text anchors to have link between "Text A" and its corresponding citation say "Para B". After that the line ending of the "Para B" is changed.

       

      "FEFF" character is a "zero width no berak space".  So I assume that it should not make any adjustement in the layout of the paragraphs, but it does.

       

      It seems to be a bug to me. Anyone had this problem before? Did anybody have the solution?

       

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

      Green4ever

        • 1. Re: <FEFF> changes the line endings - Is this a BUG?
          pkahrel CommunityMVP

          Although its width is zero, it can nevertheless change the layout, e.g. by removing kern values.

           

          Peter

          • 2. Re: <FEFF> changes the line endings - Is this a BUG?
            [Jongware] CommunityMVP

            1. Using this code as "zero width etc." has been deprecated for a while by the aunicode consortium. It only worked -- for a while -- because there usually is "nothing" associated with this code. Nowadays, use of the Byte Order Mark anywhere else than at the start of a file is actively flagged as an error, for example in an XML file. (http://www.w3.org/TR/unicode-xml/, Sec.3.5)

             

            2.

            >Although its width is zero, it can nevertheless change the layout, e.g. by removing kern values.

             

            Oh that's absolutely true. I've had text reflown in InDesign because I added XML tags to my text! (These are internally added as U+FEFF characters, and subsequently mess up my perfectly good formatting.)

            • 3. Re: <FEFF> changes the line endings - Is this a BUG?
              Green4ever Community Member

              Hi Peter and Jongware,

               

              Thanks for your reply. Is there any work around to bring back the layout that we did before inserting the U+FEFF character.

               

              For example by giving a kernvalue (fixed or calculated) into the insertion point. I don't think it will work in the xml flow, but atleast it may work in my case (hyperlink text anchors).

               

              Do you think this idea will work? Can I give it a try or is it just a useless effort to do that?.

               

              So finally can we conclude this as a BUG?

               

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

              Green4ever

              • 4. Re: <FEFF> changes the line endings - Is this a BUG?
                pkahrel CommunityMVP

                > Do you think this idea will work? Can I give it a try or is it just a useless effort to do that?

                 

                Sure, try it. To get around the kerning problem to a certain extent, place the marker at the beginning or the end of words. That may help.

                 

                > So finally can we conclude this as a BUG?

                 

                It's not necessarily a bug. Anything that comes between two kerned characters cancels the kerning. It's up to you to be careful where you place markers.

                 

                Peter

                • 5. Re: <FEFF> changes the line endings - Is this a BUG?
                  Marc Autret MeganK

                  Edit: Sorry, my post was out of the topic!

                   

                  U+FEFF indeed is the ZERO WIDTH NO-BREAK SPACE in Unicode, but InDesign is not fully Unicode-compliant*! Basically, ID uses U+FEFF to internally encode various markers (index marker, note marker, conditional text marker) so it's probably not a good idea to use that character as a ZW NBSP. Maybe you could try U+200D (ZERO WIDTH JOINER) instead…

                   

                  * Take a look at: http://www.indiscripts.com/blog/public/data/idcs4-special-characters/en_InDesignCS4-CS5-Sp ecialChars.pdf (code points which appear in RED indicate where InDesign does not comply with Unicode semantics).

                   

                  @+

                  Marc

                  • 6. Re: <FEFF> changes the line endings - Is this a BUG?
                    Green4ever Community Member

                    Hi Peter,

                    Many thanks for your reply...

                    > So finally can we conclude this as a BUG?

                    It's not necessarily a bug. Anything that comes between two kerned characters cancels the kerning. It's up to you to be careful where you place markers.

                     

                    My script will place the marker at start of the paragraph only, even though it is adjusting the layout of the paragraph. So In this case, I feel definitely it looks like a bug.

                     

                    Sure, I'll try it by adjusting the kern values. Thanks a lot.

                     

                    ---------

                    Green4ever

                    • 7. Re: <FEFF> changes the line endings - Is this a BUG?
                      [Jongware] CommunityMVP

                      >It's not necessarily a bug. Anything that comes between two kerned characters cancels the kerning. It's up to you to be careful where you place markers.

                       

                      I cannot decide to put my XML markers anywhere else. These (and Greenies Hyperlinks) are not layout elements, and should NOT be messing with text layout!

                       

                      It's a bug because this interferes with text when it shouldn't, and it's due to the way Adobe implemented these supposedly "invisible" markers as actual character codes!!