develooper Front page | perl.perl5.porters | Postings from July 2019

[perl #134262] Missing XSUB functions for UTF-8 char* buffers

Thread Previous
From:
perlbug-followup
Date:
July 4, 2019 11:02
Subject:
[perl #134262] Missing XSUB functions for UTF-8 char* buffers
Message ID:
rt-4.0.24-32222-1562238161-1802.134262-75-0@perl.org
# New Ticket Created by   
# Please include the string:  [perl #134262]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134262 >


Hi! Currently there are (for x86) XSUB functions/macros which take only
Latin1 buffer. E.g. XST_mPV(), XSRETURN_PV(), POPpbytex, PUSHp(),
XPUSHs(), etc...

Could it be possible to add also UTF8 functions/macros variants?
E.g. XST_mPVutf8, XSRETURN_PVUTF8, POPputf8x, PUSHputf8, ...

It would simply working with UTF-8 char* strings as currently the only
way is to use XSRETURN_SV / POPs / PUSHs macros and construct SV* from
UTF-8 manually via newSVpvn_utf8().

And UTF-8 char* strings are needed to deal with UNICODE Perl strings
correctly, as Latin1 char* strings can store only U+00 .. U+FF UNICODE
codepoints.


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About