From 20383a3f634aef56413c5451bbf31be5eea2932a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 16 Mar 2021 19:09:01 -0400 Subject: Done with PHP. --- stdlib/source/lux/data/text/encoding.lux | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'stdlib/source/lux/data/text/encoding.lux') diff --git a/stdlib/source/lux/data/text/encoding.lux b/stdlib/source/lux/data/text/encoding.lux index 4622c8be9..3296f78c4 100644 --- a/stdlib/source/lux/data/text/encoding.lux +++ b/stdlib/source/lux/data/text/encoding.lux @@ -204,7 +204,9 @@ (pack [Text] RubyString))) @.php - (as_is (host.import: (unpack [host.String host.String] Binary)) + (as_is (host.import: Almost_Binary) + (host.import: (unpack [host.String host.String] Almost_Binary)) + (host.import: (array_values [Almost_Binary] Binary)) (def: php_byte_array_format "C*"))} (as_is))) @@ -249,7 +251,10 @@ (RubyString::bytes [])) @.php - (..unpack [..php_byte_array_format value])})) + (|> (..unpack [..php_byte_array_format value]) + ..array_values + ("php object new" "ArrayObject") + (:coerce Binary))})) (def: (utf8\decode value) (-> Binary (Try Text)) -- cgit v1.2.3