Skip to content

Overflow exception is thrown by Transliterate method for certain characters #159

@santoshsg1308

Description

@santoshsg1308

We are getting an Overflow exception while passing certain characters for conversion to Translieterate method. for eg: if we pass ﷺ as input below

using (var transliteratorLatn = Icu.Transliterator.CreateInstance("Any-Latn"))
{
    return transliteratorLatn.Transliterate(input);
}

If we increase the textMultiplier size to 20 instead of default 3 . i.e. if we do this
transliteratorLatn.Transliterate(input, 20);

then the it works. However we can't be always sure what that second parameter would be ?
Can you please help in resolving the issue?
Also would it have any performance impact in terms of memory consumption increasing the value of textMultiplier as we are upping the buffer value thats gonna hold the converted string?

Below is the exception stack trace
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions