Skip to content

Commit 5f1b8e6

Browse files
Merge pull request livecode#2782 from livecodesebastien/bugfix-15750
[[ Bug 15750 ]] Document URL behaviour with Unicode files
2 parents 88b5b39 + 4dbee37 commit 5f1b8e6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

docs/dictionary/keyword/URL.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<doc> <legacy_id>2120</legacy_id> <name>URL</name> <type>keyword</type> <syntax> </syntax> <synonyms> </synonyms> <summary>Designates a <glossary tag="container">container</glossary> consisting of an Internet <glossary tag="resource">resource</glossary> or local <keyword tag="file">file</keyword> in the form of a <keyword tag="URL">URL</keyword>.</summary> <examples><example>get URL "http://www.xworlds.com/index.html"</example><example>put URL "binfile:/Mac HD/Files/example.gif" into image "Example Logo"</example><example><p>post field "Results" to URL "http://www.example.org/current.txt"</p></example><example>get URL "http://www.xworlds.com/index.html"</example> </examples> <history> <introduced version="1.0">Added.</introduced> <deprecated version=""></deprecated> <removed version=""></removed> <changed version="4.6.1">Updated for iOS and Android Support.</changed> <experimental version=""></experimental> <nonexperimental version=""></nonexperimental> </history> <objects> </objects> <platforms> <mac/> <windows/> <linux/> <ios/> <android/> </platforms> <classes> <desktop/> <server/> <web/> <mobile/> </classes> <security> <network/> </security> <classification> <category>Files, Folders, &amp; Resources</category> <category>Networks &amp; Communication</category> <category>Standalone Applications</category> </classification> <references> <command tag="libURLSetAuthCallback">libURLSetAuthCallback Command</command> <command tag="launch url">launch url Command</command> <command tag="libURLSetExpect100">libURLSetExpect100 Command</command> <command tag="load">load Command</command> <property tag="HTMLText">HTMLText Property</property> </references> <description> <overview>Use the <b>URL</b> <glossary tag="keyword">keyword</glossary> to access the contents of a local <keyword tag="file">file</keyword> or a <keyword tag="file">file</keyword> accessible on the Web.</overview> <parameters> </parameters> <value></value> <comments>A <b>URL</b> is a method of designating a file or other resource. You can use a <b>URL</b> like any other container. You can get the contents of a <b>URL</b> or use its contents in any expression. LiveCode supports the following <b>URL</b> schemes:<p></p><p><b>http</b>: a page from a web server</p><p><b>ftp</b>: a directory or file on an FTP server</p><p><b>file</b>: a text file on the local disk (not on a server)</p><p><b>binfile</b>: a binary file</p><p><b>resfile</b>: on Mac OS and OS X systems, the resource fork of a file</p><p></p><p>All actions that refer to a <b>URL</b> container are blocking: that is, the handler pauses until LiveCode is finished accessing the <b>URL</b>. Since fetching a web page may take some time due to network lag, accessing URLs may take long enough to be noticeable to the user. To avoid this delay, use the load command (which is non-blocking) to cache web pages before you need them.</p><p></p><p>For technical information about URLs and URL schemes, see RFC 1630 at http://www.ietf.org/rfc/rfc1630.txt.</p><p></p><p><important> The http and ftp keywords are part of the Internet library on desktop platforms. To ensure that these <b>URL</b> types work in a desktop standalone application, you must include this custom library when you create your standalone. In the Inclusions section of the Standalone Application Settings window, make sure Internet Library is selected in the list of script libraries. The iOS and Android engines do not support 'libUrl' but allow you to use <b>URL</b>. When specifying URLs for iOS and Android, you must use the appropriate form that confirms to the RFC standards. Ensure that you urlEncode any username and password fields appropriately for FTP urls.</important><p></p><p><important> The space character is not valid in URLs, however libURL (Desktop platforms) replaces this character with the required '%20'. This is something that the mobile and server platforms do not do. Be careful to construct valid URLs when working an fully cross platform applications.</important></comments> </description></doc>
1+
<doc> <legacy_id>2120</legacy_id> <name>URL</name> <type>keyword</type> <syntax> </syntax> <synonyms> </synonyms> <summary>Designates a <glossary tag="container">container</glossary> consisting of an Internet <glossary tag="resource">resource</glossary> or local <keyword tag="file">file</keyword> in the form of a <keyword tag="URL">URL</keyword>.</summary> <examples><example>get URL "http://www.xworlds.com/index.html"</example><example>put URL "binfile:/Mac HD/Files/example.gif" into image "Example Logo"</example><example><p>post field "Results" to URL "http://www.example.org/current.txt"</p></example><example>get URL "http://www.xworlds.com/index.html"</example> </examples> <history> <introduced version="1.0">Added.</introduced> <deprecated version=""></deprecated> <removed version=""></removed> <changed version="7.0.0">Added support for Unicode files</changed><changed version="4.6.1">Updated for iOS and Android Support.</changed> <experimental version=""></experimental> <nonexperimental version=""></nonexperimental> </history> <objects> </objects> <platforms> <mac/> <windows/> <linux/> <ios/> <android/> </platforms> <classes> <desktop/> <server/> <web/> <mobile/> </classes> <security> <network/> </security> <classification> <category>Files, Folders, &amp; Resources</category> <category>Networks &amp; Communication</category> <category>Standalone Applications</category> </classification> <references> <command tag="libURLSetAuthCallback">libURLSetAuthCallback Command</command> <command tag="launch url">launch url Command</command> <command tag="libURLSetExpect100">libURLSetExpect100 Command</command> <command tag="load">load Command</command> <property tag="HTMLText">HTMLText Property</property> </references> <description> <overview>Use the <b>URL</b> <glossary tag="keyword">keyword</glossary> to access the contents of a local <keyword tag="file">file</keyword> or a <keyword tag="file">file</keyword> accessible on the Web.</overview> <parameters> </parameters> <value></value> <comments>A <b>URL</b> is a method of designating a file or other resource. You can use a <b>URL</b> like any other container. You can get the contents of a <b>URL</b> or use its contents in any expression. LiveCode supports the following <b>URL</b> schemes:<p></p><p><b>http</b>: a page from a web server</p><p><b>ftp</b>: a directory or file on an FTP server</p><p><b>file</b>: a text file on the local disk (not on a server)</p><p><b>binfile</b>: a binary file</p><p><b>resfile</b>: on Mac OS and OS X systems, the resource fork of a file</p><p></p><p>All actions that refer to a <b>URL</b> container are blocking: that is, the handler pauses until LiveCode is finished accessing the <b>URL</b>. Since fetching a web page may take some time due to network lag, accessing URLs may take long enough to be noticeable to the user. To avoid this delay, use the load command (which is non-blocking) to cache web pages before you need them.</p><p></p><p>For technical information about URLs and URL schemes, see RFC 1630 at http://www.ietf.org/rfc/rfc1630.txt.</p><p></p><p></p><important>The http and ftp keywords are part of the Internet library on desktop platforms. To ensure that these <b>URL</b> types work in a desktop standalone application, you must include this custom library when you create your standalone. In the Inclusions section of the Standalone Application Settings window, make sure Internet Library is selected in the list of script libraries. The iOS and Android engines do not support 'libUrl' but allow you to use <b>URL</b>. When specifying URLs for iOS and Android, you must use the appropriate form that confirms to the RFC standards. Ensure that you urlEncode any username and password fields appropriately for FTP urls.</important><p></p><p></p><important>The space character is not valid in URLs, however libURL (Desktop platforms) replaces this character with the required '%20'. This is something that the mobile and server platforms do not do. Be careful to construct valid URLs when working an fully cross platform applications.</important><p></p><p></p><change></change>From LiveCode 7.0.0, <b>URL</b> keyword has been upgraded to understand Unicode files when using <i>URL("file:&lt;path&gt;")</i>. If the file located at the path has a Byte Order Mark at its beginning, then <b>URL</b> will decode the file according to that Byte Order Mark (UTF-8, UTF-16BE, UTF-16LE, UTF-32BE and UTF-32LE are compatible). If no Byte Order Mark is found, then the file will be decoded as if it were using Native encoding (<i>MacRoman</i> on Mac OS X, <i>ISO-8859-1</i> on Linux, <i>CP-1252</i> on Windows).</comments> </description></doc>

docs/notes/bugfix-15750.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Documentation updated for URL("file:<path>") and Unicode files

0 commit comments

Comments
 (0)