You can specify the encoding used for generated code by using the slCharacterEncoding function in MATLAB.
For example, run the following command before code generation:
>> slCharacterEncoding('UTF-8');
After running this, the generated C and H files will be encoded in UTF-8.
Please note that this setting applies for the current MATLAB session.