From: <ag...@us...> - 2012-01-16 20:09:40
|
Revision: 2678 http://zoolib.svn.sourceforge.net/zoolib/?rev=2678&view=rev Author: agreen Date: 2012-01-16 20:09:34 +0000 (Mon, 16 Jan 2012) Log Message: ----------- Comments. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZUnicode.cpp trunk/zoolib/source/cxx/zoolib/ZUnicode.h Modified: trunk/zoolib/source/cxx/zoolib/ZUnicode.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUnicode.cpp 2012-01-16 15:43:07 UTC (rev 2677) +++ trunk/zoolib/source/cxx/zoolib/ZUnicode.cpp 2012-01-16 20:09:34 UTC (rev 2678) @@ -291,18 +291,33 @@ const uint8 sUTF8SequenceLength[256] = { - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // Standalone - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // Standalone - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // Standalone - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // Standalone - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // Continuation - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // Continuation - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, // Start, 2 byte - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, // Start, 3 byte - 4,4,4,4,4,4,4,4, // Start, 4 byte - 5,5,5,5, // Start, 5 byte - 6,6, // Start, 6 byte - 0,0 // 0xFE and 0xFF are illegal UTF8 code units. + // Standalone + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + + // Continuation + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + + // Start, 2 byte + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + + // Start, 3 byte + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + + // Start, 4 byte + 4,4,4,4,4,4,4,4, + + // Start, 5 byte + 5,5,5,5, + + // Start, 6 byte + 6,6, + + // 0xFE and 0xFF are illegal UTF8 code units. + 0,0 }; // These arrays are indexed by sequence length. So the element 0 is never Modified: trunk/zoolib/source/cxx/zoolib/ZUnicode.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUnicode.h 2012-01-16 15:43:07 UTC (rev 2677) +++ trunk/zoolib/source/cxx/zoolib/ZUnicode.h 2012-01-16 20:09:34 UTC (rev 2678) @@ -113,7 +113,7 @@ /* These are all template functions, they'll take anything that behaves like a string::iterator or a pointer. They call through to static member functions of template structs declared in -ZUnicodePriv.h.The actual code for the three different code unit types is in ZUnicodePrivB.h, +ZUnicodePriv.h. The actual code for the three different code unit types is in ZUnicodePrivB.h, and we do explicit template instantiations of the structs in ZUnicode.cpp. So if you have a new kind of iterator you'll need to do something similar in your code. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |