Skip to main content
Known Participant
April 25, 2018
Question

accented characters not shown

  • April 25, 2018
  • 0 replies
  • 385 views

Hi

(Illustrator 2015-3, mac)

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();

     crange.InsertAfter(ai::UnicodeString(contenu).as_ASUnicode().c_str());

        // crange or textRange give the same result

       

        //debug text is OK in s

        longueur = textRange.GetContents(s, 255);

Best regards

Christian

This topic has been closed for replies.