Accented characters bug
I try to put this text in a frame.
&éèçà€ù~©®πRUNNING
Before insertAfter, the text (as a char *) is correct
After the insertAfter, it is also correct (via getContents).
But garbage is displayed as seen in the screen capture.
Dropbox - Capture d'écran 2018-04-25 05.39.42.png
I'm stuck.
Thanks for any help.
He re is some code I use.
// get contents
TextFrameRef textFrameRef = NULL;
AIErr result = sAITextFrame->GetATETextFrame(bloc, &textFrameRef);
ATE::ITextFrame textFrame(textFrameRef);
ATE::ITextRange textRange = textFrame.GetTextRange();
// textRange.Select();
//debug
int longueur = textRange.GetContents(s, 255);
// set contents to contenu
// Set the contents of the text range.
TextRangeRef range = NULL;
result = sAITextFrame->GetATETextRange(bloc, &range);
ATE::crange(range);
crange.Remove();
range.InsertAfter(ai::UnicodeString(contenu).asASUnicode().cstr());
// crange or textRange give the same result
//debug text is OK in s
longueur = textRange.GetContents(s, 255);
Best regards
Christian
Illustrator 2015.3, Mac

-
Can be related to this:
Combining Unicode Diacritical characters aren’t displayed
http://illustrator.uservoice.com/forums/601447/suggestions/33578959 -
christian commented
easy to reproduce with the snippetrunner and snptxt.InsertText procedure. Fails in cc2015 and cc2018.