convert_to_double(*var);
} else if (!strcasecmp(new_type, "double")) { /* deprecated */
convert_to_double(*var);
- } else if (!strcasecmp(new_type, "string")) {
+ } else if (!strcasecmp(new_type, "binary")) { /* explicit binary cast */
convert_to_string(*var);
- } else if (!strcasecmp(new_type, "unicode")) {
+ } else if (!strcasecmp(new_type, "string")) { /* runtime string type */
+ if (UG(unicode)) {
+ convert_to_unicode(*var);
+ } else {
+ convert_to_string(*var);
+ }
+ } else if (!strcasecmp(new_type, "unicode")) { /* explicit unicode cast */
convert_to_unicode(*var);
} else if (!strcasecmp(new_type, "array")) {
convert_to_array(*var);