summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-03-09 13:47:09 +0100
committerZolnai Tamás <zolnaitamas2000@gmail.com>2013-03-09 14:16:30 +0100
commita18d1a107e49525efd1561f396f6b2be28ab5224 (patch)
tree726db6f9244947056a878ebec24120eb502ecb6c /l10ntools
parent9c4ec7835c16b90425bfd05721db37f922f10226 (diff)
Use simpler keyid with 5 digits
Change-Id: Iac743d4f298b43067fe5db9199eb39c3301f827e
Diffstat (limited to 'l10ntools')
-rwxr-xr-xl10ntools/source/po.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 99e113b2739f..cdb5fb4db202 100755
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -264,16 +264,16 @@ namespace
boost::crc_32_type aCRC32;
aCRC32.process_bytes(rGenerator.getStr(), rGenerator.getLength());
sal_uInt32 nCRC = aCRC32.checksum();
- //Use all readable ASCII character exclude xml special tags: ",',&,<,>
+ ///Use simple ASCII characters, exclude I, l, 1 and O, 0 to avoid confusing IDs
static const OString sSymbols =
- "!#$%()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
- char sKeyId[5];
- for( short nKeyInd = 0; nKeyInd < 4; ++nKeyInd )
+ "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789";
+ char sKeyId[6];
+ for( short nKeyInd = 0; nKeyInd < 5; ++nKeyInd )
{
- sKeyId[nKeyInd] = sSymbols[(nCRC & 255) % 89];
- nCRC >>= 8;
+ sKeyId[nKeyInd] = sSymbols[(nCRC & 63) % sSymbols.getLength()];
+ nCRC >>= 6;
}
- sKeyId[4] = '\0';
+ sKeyId[5] = '\0';
return OString(sKeyId);
}