aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_unicode.c
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2013-02-22 12:06:41 +0100
committerPatrik Nyblom <[email protected]>2013-02-22 12:06:41 +0100
commit7215c49aff685e93765598cd428baf1d4320f752 (patch)
tree76409af3ed6abe7502af3aa438e47b1be98df1e3 /erts/emulator/beam/erl_unicode.c
parent14820e983856654e68e08244e4dfc689f0804fd8 (diff)
parent2a79b74ac371387ce338bacf979f9ca32447b302 (diff)
downloadotp-7215c49aff685e93765598cd428baf1d4320f752.tar.gz
otp-7215c49aff685e93765598cd428baf1d4320f752.tar.bz2
otp-7215c49aff685e93765598cd428baf1d4320f752.zip
Merge branch 'pan/unicode_printable_ranges'
* pan/unicode_printable_ranges: Adapt stdlib tests to ~tp detecting latin1 binaries Update primary bootstrap Make wx debugger use +pc flag when applicable Correct misspelled comments and space at lin ends Make ~tp output latin1 binaries as strings if possible Leave the +pc handling to io and io_lib_pretty Remove newly introduced warning in erlexec.c Make shell_SUITE:otp_10302 use +pc unicode when needed Fix io_proto_SUITE to handle the new io_lib_pretty:print Add testcase for +pc and io:printable_range/0 Make printing of UTF-8 in binaries behave like lists. Document +pc flag and io:printable_range/0 Add usage of and spec for io:printable_range/0 Add +pc {latin1|unicode} switch and io:printable_range/0 Fix some Unicode issues OTP-18084
Diffstat (limited to 'erts/emulator/beam/erl_unicode.c')
-rw-r--r--erts/emulator/beam/erl_unicode.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_unicode.c b/erts/emulator/beam/erl_unicode.c
index 80982f3760..fa53fd0937 100644
--- a/erts/emulator/beam/erl_unicode.c
+++ b/erts/emulator/beam/erl_unicode.c
@@ -2747,3 +2747,11 @@ int erts_utf8_to_latin1(byte* dest, const byte* source, int slen)
return dp - dest;
}
+BIF_RETTYPE io_printable_range_0(BIF_ALIST_0)
+{
+ if (erts_get_printable_characters() == ERL_PRINTABLE_CHARACTERS_UNICODE) {
+ BIF_RET(am_unicode);
+ } else {
+ BIF_RET(am_latin1);
+ }
+}