[fpc-devel] RTL Unicode support
andrew.t.brunner at gmail.com
Fri Aug 24 14:43:23 CEST 2012
I've been keeping up with this topic for a while now and I haven't
read any suggestions similar to how I envision encoding support.
I think it's best to keep ansi strings intact. I also think it's best
to create a string encoding class factory for people to draw upon for
I don't think seamless conversion between types is presently required.
I think looking at all the different technologies it would be wise
for FPC to just support the encoding of ANSI strings to match that of
A "featured" encoding system would include character sets for Internet
Going between these via (streams or memory), and some or most of these
would be the ideal.
I'm thinking - borrow your design from the Image class factory system.
Using fpImage class system I can go from PNG to JPG with just
extensions and grab classes and create instances of converters there.
In the Internet app development realm we have blocks of text that we
already know what the encoding is supposed to be. Take for example a
MP3 music file with ID3 Tag for a generic string. It would be
declared as ANSI, UTF8 or UTF16.
Codec.Encode() // ie.) ansi or UTF8
Codec.Decode() // ie.) ISO-8859-1 will remove all the =20 and = for
Ideally, during design time, I could "case" all 3 types and just
reference the desired class for POS, Replace, PosEx.
The beneifts of isolating all the desired encoding types would be ease
of debugging, ease of growth, teams could target specific methods, and
if the factory return no encoding method it's not supported.
I'm at the point where I have extreme disparity codecs for various
forms of communications. My ideal would be such a system.
More information about the fpc-devel