0

In Qt for setting the label of a button to be the "Multiplication sign" (not astrisk(*)) this is used :

Button *myButton = new Button("\303\227");

I don't know anything about "\303\227". Also the code below will not print "Multiplication sign" :

cout << "\303\227" ;

I could not search for it cause I had no "keywords". I need some keywords and some information about this number and why cannot it be printed with cout object.

Also i didn't want to add Qt tag for this question cause I think this is not much Qt related.

Thanks in advance.

Learner
  • 91
  • 8

1 Answers1

0

those are called octal codes for UTF-8 characters, and I believe C++ has no useful native Unicode support. However, you may refer to this question for how to use unicode in qt. if you just want the multiplication symbol you may use this “×” U+00D7 or this U+2715 ✕

Samer Alkhatib
  • 138
  • 2
  • 11
  • *I believe C++ has no useful native Unicode support* Arguable. I'm on the side of the fence that concurs, and I'm quite a bit disappointed that out-of-the-box standard C++ library doesn't do a better job — although I do understand *why* that is the case, I'm still not happy about it. There is 3rd party library support for Unicode like iconv and ICU. – Eljay Jun 06 '21 at 15:04