From 1b4280cd2e8dcab457562bbaacc4e1d16d372185 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Wed, 13 Feb 2013 17:24:05 +0100 Subject: Document +pc flag and io:printable_range/0 --- lib/stdlib/doc/src/io.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/stdlib/doc/src/io.xml') diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml index 63f814ad2e..90f24c4cbc 100644 --- a/lib/stdlib/doc/src/io.xml +++ b/lib/stdlib/doc/src/io.xml @@ -210,6 +210,18 @@

This example is, as can be seen, run in an environment where the terminal supports Unicode input and output.

+ + + Get user requested printable character range + +

Return the user requested range of printable Unicode characters.

+

The user can request a range of characters that are to be considered printable in heuristic detection of strings by the shell and by the formatting functions. This is done by supplying +pc <range> when starting Erlang.

+

Currently the only valid values for <range> are latin1 and unicode. latin1 means that only code points below 256 (with the exception of control characters etc) will be considered printable. unicode means that all printable characters in all unicode character ranges are considered printable by the io functions.

+

By default, Erlang is started so that only the latin1 range of characters will indicate that a list of integers is a string.

+

The simplest way to utilize the setting is to call io_lib:printable_list/1, which will use the return value of this function to decide if a list is a string of printable characters or not.

+

In the future, this function may return more values and ranges. It is recommended to use the io_lib:printable_list/1 function to avoid compatibility problems.

+
+
-- cgit v1.2.3