diff options
author | Eduardo Julian | 2021-03-16 19:09:01 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-03-16 19:09:01 -0400 |
commit | 20383a3f634aef56413c5451bbf31be5eea2932a (patch) | |
tree | 61ef3ee7620b9f6f0783eb1d11a14b0353dbf9fd /stdlib/source/lux/data/text/encoding.lux | |
parent | cde758769d8950fa1f5a13aebea62be3b9602d98 (diff) |
Done with PHP.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/text/encoding.lux | 9 |
1 files changed, 7 insertions, 2 deletions
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)) |