|
|
Home » Developing U++ » U++ Developers corner » Will UPP support full UNICODE (21bits long codepoint)?
Re: Will UPP support full UNICODE (21bits long codepoint)? [message #54570 is a reply to message #54569] |
Sat, 15 August 2020 11:33   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
Oblivion wrote on Sat, 15 August 2020 11:12Quote:int GraphemeLength(const char *s);
int GraphemeLength(const wchar *s);
That requires width tables.
How about generating the width tables with uniset scripts (used by xterm et al.)?
They can generate width tables for doublewidth, ambiguous width, unknown width and combining chars from the UnicodeData.txt (latest version).
They are quite comprehensive.
I already started using them here (For double width and combining chars, ATM): https://github.com/ismail-yilmaz/upp-components/blob/master/ CtrlLib/Terminal/Cell.cpp
We can put these into a generic GetCharWidth(int c) function, then utilize them in GetGraphemeLength(const wchar *s)?
This might not be the definitve solution, but it is the battle-tested one out in the wild.
Only real downside is that the tables might need updating albeit ifrequently.
Best regards,
Oblivion
Just to make sure we are at the same page: I am not speaking about graphics width here, but a number of bytes (or words) that form a single grapheme ("combined character").
EDIT: Still not clear enough: Number of bytes of the first grapheme at s.
Mirek
[Updated on: Sat, 15 August 2020 12:27] Report message to a moderator
|
|
|
 |
|
Will UPP support full UNICODE (21bits long codepoint)?
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Tue, 11 August 2020 17:22
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: Oblivion on Sat, 15 August 2020 01:02
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Sat, 15 August 2020 01:39
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: Oblivion on Sat, 15 August 2020 11:12
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Sat, 15 August 2020 11:33
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: Oblivion on Sat, 15 August 2020 12:15
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Sat, 15 August 2020 12:44
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: Oblivion on Sat, 15 August 2020 13:15
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Sat, 15 August 2020 14:07
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: Oblivion on Sat, 15 August 2020 15:11
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Mon, 17 August 2020 10:17
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Mon, 17 August 2020 11:01
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: Oblivion on Mon, 17 August 2020 11:50
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Mon, 17 August 2020 14:04
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: Oblivion on Mon, 17 August 2020 15:17
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Tue, 18 August 2020 16:55
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: deep on Thu, 20 August 2020 07:10
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Sat, 22 August 2020 18:01
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: Oblivion on Sat, 22 August 2020 19:29
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Sun, 23 August 2020 10:06
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: Oblivion on Sun, 23 August 2020 10:52
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Sun, 23 August 2020 13:15
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: mirek on Mon, 24 August 2020 11:31
|
 |
|
Re: Will UPP support full UNICODE (21bits long codepoint)?
By: Oblivion on Sat, 15 August 2020 01:02
|
Goto Forum:
Current Time: Mon May 12 01:39:22 CEST 2025
Total time taken to generate the page: 0.00411 seconds
|
|
|