<< Click to Display Table of Contents >> Navigation: Using SMILE > Unicode support |
SMILE treats all text as null-terminated byte strings encoded as UTF-8. The default I/O format (.xdsl) is saved as UTF-8 encoded XML.
If you are using SMILE on Windows and your project is configured with "Use Unicode character set", and the string values are not known at compile time, you should convert between native Windows WCHAR strings encoded as UTF-16 and SMILE's UTF-8 with WideCharToMultiByte. The conversion from strings in SMILE to WCHAR should be performed with MultiByteToWideChar. Note that this conversion is required also for filename arguments in SMILE's I/O functions like DSL_network::ReadFile (SMILE converts its UTF-8 filename back to native Windows WCHAR). On the other hand, if the string is known and does not include characters with codepoints above 127, you can directly use char[] literal: net.WriteFile("network1.xdsl").