From 064813d9b7d7ad4d13779a0e3282e00b747372e3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 16 Sep 2015 10:09:08 -0700 Subject: 2204 --- 043new.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/043new.cc b/043new.cc index 817eee53..a99296f2 100644 --- a/043new.cc +++ b/043new.cc @@ -374,6 +374,13 @@ if (is_mu_string(r)) { return read_mu_string(data.at(0)); } +:(scenario unicode_string) +recipe main [ + x:address:array:character <- new [♠] + stash [foo:], x:address:array:character +] ++app: foo: ♠ + //: Allocate more to routine when initializing a literal string :(scenario new_string_overflow) % Initial_memory_per_routine = 2; @@ -410,8 +417,7 @@ string read_mu_string(long long int address) { if (size == 0) return ""; ostringstream tmp; for (long long int curr = address+1; curr <= address+size; ++curr) { - // todo: unicode - tmp << (char)(int)Memory[curr]; + tmp << to_unicode(static_cast(Memory[curr])); } return tmp.str(); } -- cgit 1.4.1-2-gfad0