System Extension and LC_CTYPE?

Is it possible to set LC_CTYPE in a System Extension? I am running into issues with vswprintf due to what I presume are locale-related issues. The errno that vswprintf sets is EILSEQ.

In a brand new program (not system extension), vswprintf fails with EILSEQ if LC_CTYPE is not set, but it does work when LC_CTYPE is set with something like setlocale(LC_CTYPE, "UTF-8").

The difference is that in a system extension, the setlocale() seems to make no difference.

Is there another way to set LC_CTYPE for a system extension? Is it not possible to use vswprintf within a system extension?

Answered by keehun in 697652022

Ah, turns out it isn't related to LC_CTYPE but related to the use of the -fshort-wchar flag.

Accepted Answer

Ah, turns out it isn't related to LC_CTYPE but related to the use of the -fshort-wchar flag.

System Extension and LC_CTYPE?
 
 
Q