<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: String replace function working in command line but not in .acl in Arbortext</title>
    <link>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1049744#M33722</link>
    <description>&lt;P&gt;If you open the map as a resolved document for editing (edit, edit resolved document) you can also do a find and replace that way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bryon&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jan 2026 15:40:44 GMT</pubDate>
    <dc:creator>bfriesen</dc:creator>
    <dc:date>2026-01-05T15:40:44Z</dc:date>
    <item>
      <title>String replace function working in command line but not in .acl</title>
      <link>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1049470#M33720</link>
      <description>&lt;P&gt;I am using Arbortext 8.3.&amp;nbsp; Here is the simple function in question:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;replace("ʼ", "’", 0x2000);&lt;/LI-CODE&gt;&lt;P&gt;The user has a file that contains a mix of apostrophes.&amp;nbsp; We want a consistent character used.&amp;nbsp; The first apostrophe is the&amp;nbsp;U+02BC : MODIFIER LETTER APOSTROPHE {apostrophe} and the second (the desired one) is&amp;nbsp;U+2019 : RIGHT SINGLE QUOTATION MARK {single comma quotation mark.&lt;/P&gt;&lt;P&gt;Using the following text, the last apostrophe is the one we want swapped.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;la Loi sur les traitements, aux ministres d’État qui sont à la tête d’un département dʼÉtat&lt;/LI-CODE&gt;&lt;P&gt;Using the replace function above, if I run from the command line in Arbortext Editor it works perfectly.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AP_13279061_0-1767121455643.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/133060i0481C3724F7AD456/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AP_13279061_0-1767121455643.png" alt="AP_13279061_0-1767121455643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I save that one line of code, as its own ApostropheSwap.acl file, and do a "source ApostropheSwap.acl", it does not find a match.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AP_13279061_1-1767121664726.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/133061i386D3715EC4DB143/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AP_13279061_1-1767121664726.png" alt="AP_13279061_1-1767121664726.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried saving the .acl file as UTF-8 and ANSI, and both get the same result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 30 Dec 2025 19:14:45 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1049470#M33720</guid>
      <dc:creator>AP_13279061</dc:creator>
      <dc:date>2025-12-30T19:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: String replace function working in command line but not in .acl</title>
      <link>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1049744#M33722</link>
      <description>&lt;P&gt;If you open the map as a resolved document for editing (edit, edit resolved document) you can also do a find and replace that way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bryon&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2026 15:40:44 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1049744#M33722</guid>
      <dc:creator>bfriesen</dc:creator>
      <dc:date>2026-01-05T15:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: String replace function working in command line but not in .acl</title>
      <link>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1049775#M33723</link>
      <description>&lt;P&gt;Yeah, the regular Find/Replace dialog works, but I really wanted a solution that doesn't require the user to have to do much.&amp;nbsp; The users are lawyers and dont want to be copying different apostrophes into text boxes.&amp;nbsp; At this point the simplest solution is for the user to paste the function in the command line.&amp;nbsp; &amp;nbsp;And that is not a very polished solution.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am hoping someone knows how to get that little command to work from within .acl&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2026 15:56:41 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1049775#M33723</guid>
      <dc:creator>AP_13279061</dc:creator>
      <dc:date>2026-01-05T15:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: String replace function working in command line but not in .acl</title>
      <link>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1050938#M33730</link>
      <description>&lt;P&gt;It is probably an issue with the special characters you're using. It may help if you use the chr() function instead of the literal character, something like this:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;replace(chr(0x02bc), chr(0x2019), 0x2000)&lt;/LI-CODE&gt;
&lt;P&gt;I did a quick test from an ACL script file and this seems to work for me.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2026 22:15:32 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1050938#M33730</guid>
      <dc:creator>ClayHelberg</dc:creator>
      <dc:date>2026-01-14T22:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: String replace function working in command line but not in .acl</title>
      <link>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1051032#M33732</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; &amp;nbsp; The chr() function did the trick.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2026 13:46:39 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Arbortext/String-replace-function-working-in-command-line-but-not-in-acl/m-p/1051032#M33732</guid>
      <dc:creator>apressey</dc:creator>
      <dc:date>2026-01-15T13:46:39Z</dc:date>
    </item>
  </channel>
</rss>

