<?xml version="1.0" encoding="UTF-8"?>
<doc>
	<legacy_id></legacy_id>
	<name>normalizeText</name>
	<type>function</type>

	<syntax>
		<example>normalizeText(<i>text</i>, <i>normalForm</i>)</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Converts a text string into a specific 'normal form'.</summary>

	<examples>
		<example>
set the formSensitive to true
put "e" & numToCodepoint("0x301") into tExample		-- Acute accent
put tExample is "é"										-- Returns false
put normalizeText(tExample, "NFC") is "é"			-- Returns true
		</example>
	</examples>

	<history>
		<introduced version="7.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version=""></changed>
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
		<category>Text and Data Processing</category>
		<concept>text processing</concept>
	</classification>

	<references>
		<function tag="textEncode">textEncode Function</function>
		<function tag="textDecode">textDecode Function</function>
		<property tag="formSensitive">formSensitive Property</property>
	</references>

	<description>
	<overview>Use the <b>normalizeText</b> function when you require a specific normal form of text.</overview>

		<parameters>
  <parameter>
    <name>text</name>
    <description>A string or an expression that evaluates to a string.</description>
  </parameter>
  <parameter>
    <name>normalForm</name>
    <description>In Unicode text, the same visual string can be represented by different character sequences. A prime example of this is precomposed characters and decomposed characters: an "e" followed by a combining acute character is visually indistinguishable from a precombined "é" character. Because of the confusion that can result, Unicode defined a number of "normal forms" that ensure that character representations are consistent. The "compatibility" normal forms are designed by the Unicode Consortium for dealing with certain legacy encodings and are not generally useful otherwise.</description>
    <options title="">
      <option>
        <item>NFC</item>
        <description>precomposed</description>
      </option>
      <option>
        <item>NFD</item>
        <description>decomposed</description>
      </option>
      <option>
        <item>NFKC</item>
        <description>compatibility precomposed</description>
      </option>
      <option>
        <item>NFKD</item>
        <description>compatibility decomposed</description>
      </option>
    </options>
  </parameter>		</parameters>

	<value></value>
	<comments>
	<p>Normalization is a process defined by the Unicode standard for removing minor encoding differences for a small set of characters and is more fully described in the normalizeText function.
</p>
	<note> Normalization does not avoid all problems with visually-identical characters; Unicode contains a number of characters that will (in the majority of fonts) be indistinguishable but are nonetheless completely different characters (a prime example of this is M and U+2164  ROMAN NUMERAL ONE THOUSAND).<p></note><p>Unless the <property tag="formSensitive">formSensitive property</property> is set to true, LiveCode ignores text normalization when performing comparisons.</p>
	
	</comments>
	</description>
</doc>