C++
--
Questions
--
Followers
Top Experts
What is the unicode of square solid bullet
(like the unicode of round solid bullet is \u2022)
Regards
Karan
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
http://www.fileformat.info/info/unicode/char/25a0/index.htm
0x25aa - Black small square: http://www.fileformat.info/info/unicode/char/25aa/index.htm
0x25fc - Black madium square: http://www.fileformat.info/info/unicode/char/25fc/index.htm
Thanks for the quick reply
I am using this code
const TCHAR* bullet = _T("\u25A0");
text = ConvertToCharString(bullet
But this code is not giving me the bullet output I want.
Regards
Karan






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
I didn't find the ConvertToCharString in my environment. For the bullet to show you would need a function which converts UTF-8 to wide char string and have a 'print' functions which takes wide char strings and uses a UNICODE font for output.
You could look whether the ConvertToCharString actually is a UTF-8 to Wide-String converter (where I have doubts) but maybe easier is to skip the conversion and simply have
 wchar_t bullet[2] = { 0x25A0, 0x0000 };
and print the bullet using a suitable UNICODE print function.
As told above: the usage of "\u2022" or "\u25A0" requires an output function which was able to interpret the UTF-8 or UTF-16 sequences starting with \u.
That is *not* the normal way UNICODE characters were stored in a wide char string, as the L"\u25A0" needs 6 characters (or 12 bytes in case of using wide char strings) to define the UNICODE character 0x25A0 which could be stored in *one* single wide character as well:
 GetDlgItem( IDC_STATIC1 )->SetWindowText( CString(L"Hello unicode ") + WCHAR(0x25A0) + CString(L" ") + WCHAR(0x25A0) );
I think it is resolved at compile time
>>>>>Â the L"\u25A0" needs 6 characters
It compiles in one single wide character:
      WCHAR buf[10];
      wcscpy_s( buf, L"\u25A0" );
      ASSERT( wcslen( buf ) == 1 );
In memory you have the following values (1 wide char + 1 terminator):
a0 25 00 00
See the attached image

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
C++
--
Questions
--
Followers
Top Experts
C++ is an intermediate-level general-purpose programming language, not to be confused with C or C#. It was developed as a set of extensions to the C programming language to improve type-safety and add support for automatic resource management, object-orientation, generic programming, and exception handling, among other features.