Re: Troubles with UTF-8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Bray wrote:
On Dec 28, 2005, at 12:46 PM, Randy Presuhn wrote:

Reserving NUL as a special terminator is a C library-ism.  I think  that
history has shown that the use of this kind of mechanism, rather than
explicitly tracking the string's length, was a mistake.


I guess variably lenght V-records of type

string {int type,
        int length,
        int data[] );

would be horror. That will lose you 4 bytes per word and 2 bytes for
every printable sign.

C-ASCII "Randy Presuhn" = 14 char + '\0'.

Compare it to

     99999, " R"," a"," n"," d"," y",
     99999, " P"," r"," e"," s"," h"," u"," n"

That is 28 characters now. No alternative.



I used to think so too, but I don't any more; twenty years of doing text processing has convinced me that C's null-terminated strings simply cannot be improved on in a low-level programming language. For more on the subject see http://www.tbray.org/ongoing/When/200x/ 2003/04/13/Strings -Tim


_______________________________________________

Ietf@xxxxxxxx
https://www1.ietf.org/mailman/listinfo/ietf




--
Peter and Karin Dambier
The Public-Root Consortium
Graeffstrasse 14
D-64646 Heppenheim
+49(6252)671-788 (Telekom)
+49(179)108-3978 (O2 Genion)
+49(6252)750-308 (VoIP: sipgate.de)
mail: peter@xxxxxxxxxxxxxxxxxxxxx
mail: peter@xxxxxxxxxxxxxxxx
http://iason.site.voila.fr/
https://sourceforge.net/projects/iason/


_______________________________________________

Ietf@xxxxxxxx
https://www1.ietf.org/mailman/listinfo/ietf

[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Fedora Users]