Hello ;)
Im trying to test your new string type now :) but after switching to new
branch, I couldnt compile fpc ^^
BTW:
A year ago, I wrote a complete Unicode string library for a new possible
built in string type. My Idea was to create a new built in type with an
additional flag. This flag stored the encoding of the string. By default
(if the flag is not explicitly set by the user) it was the current
system charmap.
I also wrote functions that could encode from any to any charmap (utf8,
utf16, ucs2, ucs4, iso8859, codepages, ascii, etc....). if the user
concated two strings, one encoded in ascii, and one in utf8, the
resulting string was utf8;
S1: Unistring;
S2: Unistring;
S3: Unistring;
S1 := 'hello' as ascii;
S2 := 'foobar' as utf8;
S3 := S1 + S2;
S3 was UTF8
+ the string can hold any kind of charmap and the string manager is
aware of that
- additional flag required
+ allways the optimal encoding is used
+ the dont have to care about encoding (except if he read from sources
with different encodings, like textfiles)
- maybe some extra encode/decode work required
-Ivo Steinmann
Florian Klaempfl schrieb:
I've continued to work on support of an unicodestring type in fpc.
It's currently in an svn branch at:
http://svn.freepascal.org/svn/fpc/branches/unicodestring
and will be merged later to trunk. The unicodestring type is a ref.
counted utf-16 string. On non-windows, widestring is mapped to this
type. If you're interested in unicode support please test, give
feedback here and submit fixes.
An existing working copy of trunk can be switched to this branch by
cd fpc
svn switch http://svn.freepascal.org/svn/fpc/branches/unicodestring
and back with
svn switch http://svn.freepascal.org/svn/fpc/trunk
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel