- or download this
SV* my_c_function(SV* sv) {
STRLEN len;
...
...
return newSV(...);
}
- or download this
SV* my_c_function(SV* sv) {
STRLEN len;
...
...
return newSVpvn_utf8(..., 1);
}
- or download this
use strict;
use warnings;
...
say "UCP: ", sprintf("%vX", $s); # C9.72.69.63
say "UTF-8: ", my_xs_function($s); # C3.89.72.69.63
}
- or download this
SV* my_xs_function(SV* buf_sv) {
STRLEN buf_len;
...
return hex_sv;
}
}