[utf8vcl-general] [utf8vcl - General] RE: UTF8test project not working?
Status: Alpha
Brought to you by:
bluelive
From: SourceForge.net <no...@so...> - 2007-04-03 19:20:20
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4242032 By: akirabbq Not really, there are other 2 bytes character system that is not Unicode. For example, MBCS (widely used by CJK Chinese/Japanese/Korean) is 2 bytes long, it consists of a leading byte ($81..$FE) + a trailing byte. The char value of MBCS and Unicode are incompatible to each other, MultiByteToWideChar/WideCharToMultiByte are needed for the conversion. IMHO, the main issue of UTF-8 VCL so far is from the IDE. The IDE only stores a string as AnsiString type when the component's property has the AnsiString type. So if a widestring is being pasted into the object inspector, the widestring will be converted to an AnsiString, which will destroy the integrity of the original unicode text. The string conversion must be avoided at all cost, it is impossible to mix different codepage ansistring into one single ansistring. Some work have to be done on the IDE to let the IDE convert string into UTF8 during design time. For example, when some text is being typed/pasted into the object inspector, the IDE converts the string into UTF8 first. I think it also brings another issue that the designer must be able to display UTF8 string, otherwise the readability of the designer will be terrible. If this cannot be done, then the application's GUI will get stuck in AnsiString level, since the designer wiped out all the unicode at design time. Pasting UTF8 string into the object inspector will NOT work, since UTF8's highbyte character will mix up with MBCS's leading byte, and trash the whole string. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=671785 |