Skip to content Skip to sidebar Skip to footer

Android Textview Stackoverflow When Using Hebrew

My app is retrieving data from a RESTful http source. Sometimes, there will be Hewbrew text. title קול המדיה, עמוד הבית content הפיג'מות - עונה 6 פרק

Solution 1:

I have written Arabic text to a TextView many times without seeing a stack overflow exception, which is also a Right-to-Left (RTL) language. Did you modify the onDraw() method or any other method that might be causing this error?

If you can't find the reason, this should return true if the given inputText contains Hebrew characters:

Pattern.matches("(\\p{InHebrew})+", inputText);

You might also want to disallow any non-Latin characters if other languages cause problems as well. This site contains a list of all of the unicode scripts you can match against: Regex Tutorial - Unicode Characters

Post a Comment for "Android Textview Stackoverflow When Using Hebrew"