Code-point gluph representation
Code-point gluph representation
Suppose i must print to utf8 file a font character with code-point 100000 in decimal with no turn in hex.
How i can print that glyph?
How i can print that glyph?
Re: Code-point gluph representation
Hi,
I presume you will need to read it at some point?
What is you OS/toolkit/wx version?
Do you have a locale installed that supports this symbol?
What did you tried already?
Thank you.
I presume you will need to read it at some point?
What is you OS/toolkit/wx version?
Do you have a locale installed that supports this symbol?
What did you tried already?
Thank you.
Re: Code-point gluph representation
Linux Mint / wxWidgets 3 / gcc / CodeBlocks
I don't need locale, only glyph with codepoint 100000 in desimal, and no locale.
I have made this with c++ but only until U+FFFF char, that is 65535 in decimal.
But i want to save to file glyph 100000.
Can i with wxWidgets?
I don't need locale, only glyph with codepoint 100000 in desimal, and no locale.
I have made this with c++ but only until U+FFFF char, that is 65535 in decimal.
But i want to save to file glyph 100000.
Can i with wxWidgets?
Re: Code-point gluph representation
Hi,
Are you trying to save a file with this glyph?
Or you trying to log something?
In any case - you should be able to do that. I'm just not sure you will be able to verify what was saved...
Thank you.
Are you trying to save a file with this glyph?
Or you trying to log something?
In any case - you should be able to do that. I'm just not sure you will be able to verify what was saved...
Thank you.
Re: Code-point gluph representation
Code: Select all
wxString s( wxUniChar(100000) );
wxFile f( "c:\\_unicode_test.txt", wxFile::write );
f.Write( s, wxConvUTF8 );
f.Close();
Use the source, Luke!
Re: Code-point gluph representation
I am trying to save a file with this glyph.
Thanks very mush, i will try it...
Thanks very mush, i will try it...
Re: Code-point gluph representation
Code: Select all
wxString s( wxUniChar(100000) );
wxFile f( "c:\\_unicode_test.txt", wxFile::write );
f.Write( s, wxConvUTF8 );
f.Close();
If i change enconding i cant see glyph.
I will check if i have something wrong...
Bellow code works fine until 65535, but i dont have other glyphs up to 65535.
Code: Select all
std::string UnicodeToUTF8(unsigned int codepoint)
{
std::string out;
if (codepoint <= 0x7f)
out.append(1, static_cast<char>(codepoint));
else if (codepoint <= 0x7ff)
{
out.append(1, static_cast<char>(0xc0 | ((codepoint >> 6) & 0x1f)));
out.append(1, static_cast<char>(0x80 | (codepoint & 0x3f)));
}
else if (codepoint <= 0xffff)
{
out.append(1, static_cast<char>(0xe0 | ((codepoint >> 12) & 0x0f)));
out.append(1, static_cast<char>(0x80 | ((codepoint >> 6) & 0x3f)));
out.append(1, static_cast<char>(0x80 | (codepoint & 0x3f)));
}
else
{
out.append(1, static_cast<char>(0xf0 | ((codepoint >> 18) & 0x07)));
out.append(1, static_cast<char>(0x80 | ((codepoint >> 12) & 0x3f)));
out.append(1, static_cast<char>(0x80 | ((codepoint >> 6) & 0x3f)));
out.append(1, static_cast<char>(0x80 | (codepoint & 0x3f)));
}
return out;
}
Re: Code-point gluph representation
I just check glyph, is in codepoint 100000 ...
I cant see it.
I cant see it.
Re: Code-point gluph representation
You also need a font that contains that character.
On my Windows system there isn't a single font that contains it:
http://www.fileformat.info/info/unicode ... ertest.htm
On my Windows system there isn't a single font that contains it:
http://www.fileformat.info/info/unicode ... ertest.htm
Use the source, Luke!
Re: Code-point gluph representation
i have made a font with fonforge, full unicode with some glyphs to test.
Re: Code-point gluph representation
I just checked and code have no problem, all codes.
Notepad plus-plus have the problem.
Copying to OO no problem all are ok.
Thanks.
Jim
Notepad plus-plus have the problem.
Copying to OO no problem all are ok.
Thanks.
Jim