![]() |
![]() |
![]() |
![]() |
![]() |
This built-in function is used to encode a value argument into a universal charstring.
Related keywords:
encvalue_unichar( value_part [, string_serialization [, encoding_info [, dynamic_encoding]]] ) return universal charstring; |
Example 1:
type float MyFloat with { encode "RAW" }
var MyFloat f := 1.1;
var universal charstring ucs := encvalue_unichar(f);
This will store the "RAW" encoded form of the float value 1.1, with UTF-8 serialization, into the universal charstring variable ucs.
Example 2:
type record MyRecord {
integer num,
charstring str
}
with {
encode "XML";
encode "JSON";
}
var MyRecord r := { num := 3, str := "abc" };
var universal charstring ucs := encvalue_unichar(r, "UTF-8", "", "JSON");
This will store the "JSON" encoded form of the record value { num := 3, str := "abc" }, with UTF-8 serialization, into the universal charstring variable ucs.
BNF definition of encvalue_unichar