[pyicu-dev] Subclassing Transliterators
Christoph Burgmer
cburgmer at ira.uka.de
Thu Mar 18 02:29:13 PDT 2010
Am Samstag, 13. März 2010 schrieb Christoph Burgmer:
[...]
> There is an issue though with PyICU.Transliterator.transliterate() for
>
> UnicodeString objects:
> >>> import PyICU
> >>> t = PyICU.Transliterator.createInstance('NumericPinyin-Latin',
>
> PyICU.UTransDirection.UTRANS_FORWARD)
>
> >>> print t.transliterate('ni3hao3')
>
> nǐhǎo
>
> >>> m = PyICU.UnicodeString("ni3hao3")
> >>> print m
>
> ni3hao3
>
> >>> t.transliterate(m)
>
> u''
>
> >>> print m
>
> ni3hao3
See the attached patch for a test case.
-Christoph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unicodestring_transliteration.patch
Type: text/x-patch
Size: 932 bytes
Desc: not available
Url : http://lists.osafoundation.org/pipermail/pyicu-dev/attachments/20100318/e6e79669/attachment.bin
More information about the pyicu-dev
mailing list