in reply to Re^3: wchar_t*, char* and perl XS
in thread wchar_t*, char* and perl XS
Thanks bulk88!!
Your reply makes me clean up! VS GUI default set code to UNICODE(wide char), but gcc or cl.exe won't. So to me, choice 1 is the best, coz it keeps embeding perl(ANSI) and C CODE consistent.
BTW. for choice 4, personally, I think it's a standard solution of converting wide chars to perl. why nobody modify it a little to suit for importing to perlAPI other than just stay in win32.xs?
I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: wchar_t*, char* and perl XS
by bulk88 (Priest) on Jul 14, 2012 at 14:05 UTC | |
I have wondered that also. It should be part of Perl's Win32 Perl Standard Library in the perl interpreter, with a win32_ prefix since utf16 is so popular on Windows. You would have to bring up the problem with Perl5Porters and file a bug about there being no standard way in XS to turn a UTF16 string into a Perl Scalar. Here is a dump of Perl's win32 specific functions that exported from DLL from Perl 5.17, none of them are public api AFAIK, but some of them are just wrappers around C standard Library I think (On Windows a process can have many different C Standard Libraries loaded because each DLL was compiled with a different Visual Studio, you can not mix resources between different CRTs).
| [reply] [d/l] |
In Section
Seekers of Perl Wisdom