Hi,
Latest 2017 SDK on Windows. LOFormattedTextSetPlainText and the settextwithstyle, both return error when I pass a UTF8 string with special characters. To test it, just goto the main.cpp in CreateTable sample in SDK and do the following
// Modify the “HEIGHT” cell’s text and fill color
result = LOFormattedTextSetPlainText(cell_text_ref, “HâEIGHT”); //notice the second char
You can use the windows Character Map tool to insert special characters.
It gives general_error. Is there any other API to use ? My Visual Studio setup is set for Unicode.
I need this as I am writing a layout exporter for a European client.
Following up on this, I looked at using AutoTags and there, LOAutoTextDefinitionSetCustomText supports European characters. So while this issue is no longer critical, would like to know if my original post is a bug or there is another way to do it.
I am posting a separate thread on documentation in the latest SDK.
Very strange. I am able to reproduce the error when modifying the CreateTable sample like you suggested, but I am unable to reproduce this in a different project.
One thing you can try is to prepend your string literal with u8 (e.g. u8"Hâeight"). You may need to also save the file as “utf-8 with signature” (under File > Advanced Save Options).