You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<example>write urlEncode(arrayEncode(tArray)) to socket tSocket</example>
44
-
</examples>
45
-
<description>
46
-
<p>Use the <b>arrayEncode</b> function to convert an array into a string so that it can be saved to a file or sent across a network.</p><p/><p><b>Parameters:</b></p><p>The <i>array</i> is a LiveCode array.</p><p/><p><b>Value:</b></p><p>The <b>arrayEncode</b> function returns a string of binary data that represents the data and structure of the specified array.</p><p/><p><b>Comments:</b></p><p>The string returned by the <b>arrayEncode</b> function is designed to be used to transfer arrays to remote machines or to save them to a file on disk. It is an opaque, binary encoding of the data contained in the array. The original array can be rebuilt by using the arrayDecode function. Encoded arrays cannot easily be modified, and should always be converted back into real arrays before attemping to access or modify them. </p><p/><p>To send an encoded array to a remote process over TCP/IP, it should be encoded using the <function tag="URLEncode">URLEncode function</function>, as it may contain characters not suitable for use in URLs.</p><p/><p><b>Note:</b> Arrays in LiveCode are un-ordered. This means in particular that encoding two arrays will not necessarily produce the same result, even if the arrays had the same elements. To compare two arrays, simply use the <operator tag="=">= operator</operator> directly on them rather than encoding them first.</p><p/>
<commandtag="write to socket">write to socket command</command>
64
+
<keywordtag="[]">[] keyword</keyword>
65
+
</references>
66
+
67
+
<description>
68
+
<overview>Use the <b>arrayEncode</b> function to convert an array into a string so that it can be saved to a file or sent across a network.</overview>
69
+
70
+
<parameters>
71
+
<parameter>
72
+
<name>array</name>
73
+
<description>The array is a LiveCode array.</description>
74
+
</parameter>
75
+
<parameter>
76
+
<name>version</name>
77
+
<description>If present, and >= "7.0" then the array is encoded in such a way as to preserve unicode in keys and values, as well as NUL chars in keys and values</description>
78
+
</parameter> </parameters>
79
+
80
+
<value>The <b>arrayEncode</b> function returns a string of binary data that represents the data and structure of the specified array.</value>
81
+
<comments><p>The string returned by the arrayEncode function is designed to be used to transfer arrays to remote machines or to save them to a file on disk. It is an opaque, binary encoding of the data contained in the array. The original array can be rebuilt by using the arrayDecode function. Encoded arrays cannot easily be modified, and should always be converted back into real arrays before attemping to access or modify them. </p><p></p><p>To send an encoded array to a remote process over TCP/IP, it should be encoded using the URLEncode function, as it may contain characters not suitable for use in URLs.</p><p></p><p><b>Note:</b> Arrays in LiveCode are un-ordered. This means in particular that encoding two arrays will not necessarily produce the same result, even if the arrays had the same elements. To compare two arrays, simply use the = operator directly on them rather than encoding them first.</p><p></p></comments>
Copy file name to clipboardExpand all lines: docs/dictionary/function/textDecode.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,6 @@
119
119
</parameter> </parameters>
120
120
121
121
<value>Returns the binaryData as text.</value>
122
-
<comments>The <b>uniDecode</b> function takes binary data, in the specified encoding, and returns the given string as text.<p></p><p>It is highly recommended that any time you interface with things outside LiveCode (files, network sockets, processes, etc) that you explicitly <functiontag="textEncode">textEncode</function> any text you send outside LiveCode and textDecode all text received into LiveCode. If this doesnt happen, a platform-dependent encoding will be used (which normally does not support Unicode text).</p><p></p><p>It is not, in general, possible to reliably auto-detect text encodings so please check the documentation for the programme you are communicating with to find out what it expects. If in doubt, try UTF-8.</p></comments>
122
+
<comments>The <b>textDecode</b> function takes binary data, in the specified encoding, and returns the given string as text.<p></p><p>It is highly recommended that any time you interface with things outside LiveCode (files, network sockets, processes, etc) that you explicitly <functiontag="textEncode">textEncode</function> any text you send outside LiveCode and textDecode all text received into LiveCode. If this doesnt happen, a platform-dependent encoding will be used (which normally does not support Unicode text).</p><p></p><p>It is not, in general, possible to reliably auto-detect text encodings so please check the documentation for the programme you are communicating with to find out what it expects. If in doubt, try UTF-8.</p></comments>
Copy file name to clipboardExpand all lines: docs/dictionary/function/textEncode.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,6 @@
119
119
</parameter> </parameters>
120
120
121
121
<value>Returns the <i>stringToEncode</i> as binary data.</value>
122
-
<comments>The <b>uniEncode</b> function takes text, and returns it as binary data, encoded with the specified encoding.<p></p><p>It is highly recommended that any time you interface with things outside LiveCode (files, network sockets, processes, etc) that you explicitly <functiontag="textEncode">textEncode</function> any text you send outside LiveCode and <functiontag="textDecode">textDecode</function> all text received into LiveCode. If this doesnt happen, a platform-dependent encoding will be used (which normally does not support Unicode text).</p><p></p><p>It is not, in general, possible to reliably auto-detect text encodings so please check the documentation for the programme you are communicating with to find out what it expects. If in doubt, try UTF-8.</p></comments>
122
+
<comments>The <b>textEncode</b> function takes text, and returns it as binary data, encoded with the specified encoding.<p></p><p>It is highly recommended that any time you interface with things outside LiveCode (files, network sockets, processes, etc) that you explicitly <functiontag="textEncode">textEncode</function> any text you send outside LiveCode and <functiontag="textDecode">textDecode</function> all text received into LiveCode. If this doesnt happen, a platform-dependent encoding will be used (which normally does not support Unicode text).</p><p></p><p>It is not, in general, possible to reliably auto-detect text encodings so please check the documentation for the programme you are communicating with to find out what it expects. If in doubt, try UTF-8.</p></comments>
Copy file name to clipboardExpand all lines: docs/dictionary/keyword/sentence.xml
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
14
14
<examples>
15
15
<example><p>put "This is the first sentence. This is the second sentence." into tText</p><p>put sentence 2 of tText -- returns "This is the second sentence."</p></example>
16
-
<example><p>put "The green apple costs $0.50, the red apple costs $0.60. Which one should I buy?" into tText</p><p>put the first sentence of tText -- returns "The green apple costs $0.50, the red apple costs $0.60."</p></example>
16
+
<example><p>put "The green apple costs $0.50, the red apple costs $0.60. Which one should I buy?" into tText</p><p>put the first sentence of tText -- returns "The green apple costs $0.50, the red apple costs $0.60. " also note that the space after the full stop is included in the return value.</p></example>
17
17
</examples>
18
18
19
19
<history>
@@ -49,6 +49,7 @@
49
49
50
50
<classification>
51
51
<category>Text and Data Processing</category>
52
+
<category></category>
52
53
</classification>
53
54
54
55
<references>
@@ -69,6 +70,6 @@
69
70
</parameters>
70
71
71
72
<value></value>
72
-
<comments>A <b>sentence</b> is a chunk delimited by Unicode sentence breaks, as determined by the ICU Library. A sentence can contain multiple words, but not multiple lines.<p></p><p></p><note> The sentence chunk includes the punctuation mark at the end of the sentence, if there is one.</note></comments>
73
+
<comments><p>A <b>sentence</b> is a chunk delimited by Unicode sentence breaks, as determined by the ICU Library. A sentence can contain multiple words, but not multiple lines.</p><p></p><p><b>Note: </b> The sentence chunk includes the punctuation mark at the end of the sentence, if there is one. It will also include any trailing spaces. The rules describing Unicode sentence breaks are available at <a>http://www.unicode.org/reports/tr29/#Sentence_Boundaries</a>.</p></comments>
<overview>Use the <b>cursorMovement</b> property to set the mechanism that is to be used for moving the cursor in a field.</overview>
63
+
64
+
<parameters>
65
+
<parameter>
66
+
<name>mechanism</name>
67
+
<description>The mechanism to be used used for moving the cursor in a field</description>
68
+
<optionstitle="">
69
+
<option>
70
+
<item>visual</item>
71
+
<description>moves the cursor in visual order</description>
72
+
</option>
73
+
<option>
74
+
<item>logical</item>
75
+
<description>moves the cursor to the next character in logical (reading) order</description>
76
+
</option>
77
+
<option>
78
+
<item>empty</item>
79
+
<description>moves the cursor using the default behavior on the current platform</description>
80
+
</option>
81
+
</options>
82
+
</parameter> </parameters>
83
+
84
+
<value></value>
85
+
<comments><p>The <b>cursorMovement</b> property sets the mechanism that is to be used for moving the cursor in fields containing both left-to-right and right-to-left text.</p><p></p><p>The "visual" cursor movement mechanism moves the cursor in visual order, i.e pressing left will always move the cursor one position to the left. This is the default cursor movement on OS X.</p><p></p><p>The "logical" cursor movement moves the cursor to the next character in logical (reading) order when the left arrow is pressed and to the previous logical character when the right arrow is pressed. This is the default cursor movement on Windows.</p><p></p><p>Setting the <b>cursorMovement</b> property to empty indicates that the engine should use the default behaviour for the platform that it is being run on.</p></comments>
<overview>Use the <b>textDirection </b>property of a field to specify how the contents of a field should be laid out.</overview>
62
+
63
+
<parameters>
64
+
<parameter>
65
+
<name>direction</name>
66
+
<description>The direction to be used to lay out the contents of a field</description>
67
+
<optionstitle="">
68
+
<option>
69
+
<item>ltr</item>
70
+
<description>Left-to-right</description>
71
+
</option>
72
+
<option>
73
+
<item>rtl</item>
74
+
<description>Right-to-left</description>
75
+
</option>
76
+
<option>
77
+
<item>empty</item>
78
+
<description>Auto-detect based on the contents of the field.</description>
79
+
</option>
80
+
</options>
81
+
</parameter> </parameters>
82
+
83
+
<value></value>
84
+
<comments><p>The <b>textDirection </b>property of a field species how the contents of a field should be laid out.</p><p></p><p>The "ltr" direction specifies that the contents of the field are to be laid out in a left-to-right manner. Tabs and lines start at the left-hand side. Runs of RTL text will still be arranged correctly but will be aligned to the left.</p><p></p><p>The "rtl" direction specifies that the contents of the field are to be laid out in a right-to-left manner. Tabs and lines start at the right-hand side. Runs of LTR text will still be arranged correctly but will be aligned to the right.</p><p></p><p>Setting the <b>textDirection</b> property to empty indicates that the engine should auto-detect LTR or RTL behaviour based on the contents of the field. To do this, it looks for the first strongly-directional character in the field (e.g a Latin letter or an Arabic letter).</p></comments>
0 commit comments