Notifications
Clear all

[Closed] WriteString in Unicode format

Hi all!

I’m exporting a scene as a binary file that needs to be read from an application I’m developing. The application uses strings in 16-bit format, but Max writes them in 8-bit format. String’s characters are therefore read 16-bit at a time from the binary file, leading to an invalid name.

Is there the way to write strings in 16-bit format from Max, or do I have to use some tricks like convert string’s characters to their Unicode value in Max, and then write them as a byte values (using padding to write the first two zero bytes)??
For example:
string: texture.jpg
t -> Unicode code: 0074 -> “WriteByte” 0 and “WriteByte 116
etc…

Thx for your help!
Regards,
Adriano