<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>len function does not count special characters</title><link>https://community.appian.com/discussions/f/general/18432/len-function-does-not-count-special-characters</link><description>Hello there, 
 We are validating a text entered by the user to be under 4000 characters to avoid Oracle errors. We are using the function &amp;quot;len&amp;quot; to do that. 
 However, the function is not taking into account special characters (but Oracle does). Is there</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: len function does not count special characters</title><link>https://community.appian.com/thread/72578?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 17:18:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b036f29c-7876-4355-93da-e41ba2830816</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;The one super interesting case I ran into, which would be good to watch out for, is the difference between the search() function and find() function.&amp;nbsp; One is case sensitive, the other is not.&lt;/p&gt;
&lt;p&gt;But also, one registers capital I with a dot on top as 1 letter; the other registers it as 2 letters.&amp;nbsp; I think it was search() which is case insensitive and correctly reads letters with accents as 1 letter.&amp;nbsp; If you&amp;#39;re using the wrong function to locate the end of an XML file with a few of those special characters in there, you could wind up having a bad day like I did.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: len function does not count special characters</title><link>https://community.appian.com/thread/72575?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 16:47:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4d1ee801-b003-48c2-9b12-27fbc5703e41</guid><dc:creator>jesusa310</dc:creator><description>&lt;p&gt;Thanks Peter and Mike. Sorry it was my mistake. Len() does consider special characters. The confusion was caused because&lt;/p&gt;
&lt;p&gt;0123456789&lt;/p&gt;
&lt;p&gt;0123456789&lt;/p&gt;
&lt;p&gt;Is considered as 22 characters by Notepad++ and 21 characters by Appian len().&lt;/p&gt;
&lt;p&gt;I believe that Notepad++ uses 2 characters for Return line and Appian one, but there is nothing wrong with that.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: len function does not count special characters</title><link>https://community.appian.com/thread/72566?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 14:01:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:14b090d0-5b80-4c10-8cd4-8279b16101db</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Have you tried &amp;quot;&lt;em&gt;&lt;strong&gt;&lt;a href="https://docs.appian.com/suite/help/19.4/fnc_text_lenb.html"&gt;lenb()&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;&amp;quot;?&amp;nbsp; I haven&amp;#39;t tested it extensively but it claims to return length in bytes for a string, instead of length in characters - which would usually be the same, except (presumably) for cases like unicode characters that consume more than one byte (which i assume is what you mean by &amp;quot;special characters&amp;quot;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: len function does not count special characters</title><link>https://community.appian.com/thread/72564?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 13:06:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f9cd4add-04f2-4ba5-bc25-915b403746b2</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Can you give an example of the function you tried? In my experience, len()&amp;nbsp;&lt;strong&gt;does&lt;/strong&gt; consider special characters. For example, the result of this expression is 21:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;len(&amp;quot;0123456789
0123456789&amp;quot;)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>