ICU-8090 Transliterator, fix instantiation failures.

X-SVN-Rev: 28929
This commit is contained in:
Andy Heninger 2010-10-27 23:35:12 +00:00
parent e3756f710b
commit 19dbe7e1cc
2 changed files with 14 additions and 2 deletions

View File

@ -1173,6 +1173,18 @@ TransliteratorEntry* TransliteratorRegistry::find(UnicodeString& source,
TransliteratorSpec trg(target);
TransliteratorEntry* entry;
// Seek exact match in hashtable. Temporary fix for ICU 4.6.
// TODO: The general logic for finding a matching transliterator needs to be reviewed.
// ICU ticket #8089
UnicodeString ID;
TransliteratorIDParser::STVtoID(source, target, variant, ID);
entry = (TransliteratorEntry*) registry.get(ID);
if (entry != 0) {
// std::string ss;
// std::cout << ID.toUTF8String(ss) << std::endl;
return entry;
}
if (variant.length() != 0) {
// Seek exact match in hashtable

View File

@ -1,6 +1,6 @@
/*
**************************************************************************
* Copyright (c) 2002-2005, International Business Machines Corporation *
* Copyright (c) 2002-2010, International Business Machines Corporation *
* and others. All Rights Reserved. *
**************************************************************************
* Date Name Description *
@ -147,7 +147,7 @@ class TransliteratorIDParser /* not : public UObject because all methods are sta
* @param dir the direction.
* @param withParens INPUT-OUTPUT parameter. On entry, if
* withParens[0] is 0, then parens are disallowed. If it is 1,
* then parens are requires. If it is -1, then parens are
* then parens are required. If it is -1, then parens are
* optional, and the return result will be set to 0 or 1.
* @param canonID OUTPUT parameter. The pattern for the filter
* added to the canonID, either at the end, if dir is FORWARD, or