ICU-2929 Include the minor UCA version when ucol_getVersion is called.

X-SVN-Rev: 24469
This commit is contained in:
Michael Ow 2008-08-08 15:04:18 +00:00
parent 21ff136d04
commit 95ccfc636d
3 changed files with 4 additions and 3 deletions

View File

@ -7360,7 +7360,8 @@ ucol_getVersion(const UCollator* coll,
versionInfo[1] = (uint8_t)cmbVersion;
versionInfo[2] = coll->image->version[1];
if(coll->UCA) {
versionInfo[3] = coll->UCA->image->UCAVersion[0];
/* Include the minor number when getting the UCA version. (major & 1f) << 3 | (minor & 7) */
versionInfo[3] = (coll->UCA->image->UCAVersion[0] & 0x1f) << 3 | (coll->UCA->image->UCAVersion[1] & 0x07);
} else {
versionInfo[3] = 0;
}

View File

@ -285,7 +285,7 @@ void TestProperty()
ICU 2.8 currVersionArray = {0x29, 0x80, 0x00, 0x04};
ICU 3.4 currVersionArray = {0x31, 0xC0, 0x00, 0x04};
*/
UVersionInfo currVersionArray = {0x31, 0xC0, 0x00, 0x05};
UVersionInfo currVersionArray = {0x31, 0xC0, 0x00, 0x29};
/* ICU 3.4 had UCA 4.1 */
/*UVersionInfo currUCAVersionArray = {4, 1, 0, 0};*/
UVersionInfo currUCAVersionArray = {5, 1, 0, 0};

View File

@ -104,7 +104,7 @@ CollationAPITest::TestProperty(/* char* par */)
ICU 2.8 currVersionArray = {0x29, 0x80, 0x00, 0x04};
ICU 3.4 currVersionArray = {0x31, 0xC0, 0x00, 0x04};
*/
UVersionInfo currVersionArray = {0x31, 0xC0, 0x00, 0x05};
UVersionInfo currVersionArray = {0x31, 0xC0, 0x00, 0x29};
UVersionInfo versionArray;
int i = 0;