Arabic & English text problem in Galaxy S and Nexus S in TextView - android

With a TextView with right gravity when I write a mix of English and Arabic texts, some English texts are moved to the right of the TextView and are not shown.
This may be because of some sort of arabizer in Samsung.
Any suggestions to fix that?

RTL language support is only partially implemented in Android 2.3. This may be one of the limitations. Try it in a 2.3 emulator (to see if this is specific to Samsung, as you suggest) and a 3.0 emulator (to see if this has been improved).

Related

Numbers wrongly shown right to left anywhere

I'm having a problem with my Huawei y600 Android phone in stock rom. The problem is with numbers. They are shown correctly when language is English (left to right), but when I change the language to Farsi (right to left; My native Language) the numbers go right to left too and thats a totall wrong!
This is the screenshot when the phone is in English:
The clock is in the correct format, it shows 18:45. numbers are correct in contacts too:
But when language changes clock goes freaky:
The clock was 18:56. it shows(in my language) "8164:" note that the ":" mark will go at the end too...and 18 46 will go 81 64. They go right to left same as the texts..but thats wrong... it's worse when in contacts (It's the Same Number):
As you See The 09113924601 Is 4601 392 0911. they all go right to left.
I just tested my phone more an i founded out that this problem is only whit persian not any other right to left language(like arabic),so i think if there is an app or an adb command to make the rom uses arabic numbers while using persian words i think the problem will be fixed cuz arabic and persian numbers are the same.
i tried more locale 2 and i mixed the arabic and persian in ways like arabic in language and iran in country and reverse but didnt worked.
1_is there a program to specify the parameters more accurately like numbers seprate and words seprate?
2_what is "variant" in more locale 2 app?
This seems like a bug in the software implementation of certain stock programs on the device. They most likely haven't been tested correctly in Farsi, yet still make some basic use of language translation features (albeit incorrectly).
I suggest downloading some separate programs from an app store (e.g. Google Play) to replace the stock programs that don't work correctly for you... so find a new launcher program, and a new contacts program.

Dipaly farsi text in android webview (for phones not supporting farsi)

In farsi letters are attach together to form writing scripts. However when I save HTML pages using "UTF-8" or "Windows-1256" encdoings, and try to display them using webview in android, letters are diplayed seperately and in left-to-right direction (instead of RTL).
I should notice that this case is not happening in phones supporting farsi.
Correct form should be like this (snapshot from phone supporting farsi):
Bad-formed text happens in phones not supporing farsi (Persian):
It should be noticed i've used persian font in both cases.
I also see some solutions for normal Strings in java which changes character on by one in this
question
My question: Can i fix this cases (or it should be fix by phone vendors)? if possible what is solution?
I hit this bug a lot when I was doing keyboards. The problem is that the build in canvas.drawText function in Android didn't support RTL languages. There was a patch for it, but it wasn't part of the default build of Android. So only models going out to those parts of the world that used it tended to have it. Unfortunately I know of no way to test whether it has the patch. And if it doesn't, there's no way to fix it. You could try reversing the text, but then you'd break devices which did have the patch.
Long story short- there is no way to fix it. However, I'd be shocked if Google hasn't picked up the patch in mainline by now (it existed back in the 2.2 days), so its a shrinking number of phones effected.
You can try making html with reverse font sequence! just write a windows app to get font and deliver reverse one, and use it in your android device

Hindi character view different on different devices

I am implementing multi-lingual (French, Chinese, Hindi....etc) functionality. As Hindi language does not support back compability (below 4.0 ICS), I forced localization using Typeface(akshar.ttf). While testing my setup out with Hindi, I came across a critical condition see the image below:
In this string I'm using अब स्क्रीन शुरू करें(Now, I start the screen) and उपयोगी लिंक्स (Useful links)
Supported devices: Samsung ACE, Samsung S Plus, Galaxy 551
Non-supported devices: Samsung Galaxy S2, HTC Nexus One, HTC Incredible S
Any idea why this is happening?
The problem is you cant directly put a hindi font inside where as we need to convert it to unicode and put that. We came up with the same issue and we acheived it by using unicodes instead of fonts.
Might be little late to answer, still posting if this helps someone.
Problem is might be with android unicode font rendering.
The easiest way to solve your issue is find an ISO charset based font (if available :), try this http://www.gbpuat.ac.in/hindifonts.htm ) and embed with your app.
Otherwise you need to reorder the unicode characters to get it work. The reordering of characters might be different from device to device.
Hope this helps.
You need to put unicode characters everywhere to confirm on all the devices. Here is the site that may help you in finding unicodes
http://unicode-table.com/en/

Problem with Hindi keyboard on Android 2.3 emulator

I have selected some of the languages (like Hindi, English(India), English(United Kingdom) etc.) from Input languages option in Android keyboard settings in my emulator (Android 2.3 API). But the problem is that neither it is showing HINDI characters on Soft Keyboard nor displaying some of the Numbers on the keys e y u i o.
Problem is exactly shown in below given screenshot:
Also it is displaying rectangular boxes instead of characters.
Read this Android Feature Request. If you read towards the end (December 2010), you will see discussions of Gingerbread (Android v2.3) and that although it has gone some way to supporting Hindi language, it is still not providing full support 'out of the box'.
i tried changing fonts in platforms/android9/data/fonts folder and then created new avd.
please try krutidev010 font is it working then.

Android 2.3 Hebrew Support in Webview

I have testing an app I ported to 2.3 on the Android 2.3 emulator, the app includes Hebrew strings displayed in a WebView required solving three problems:
Telling webview to use hebrew fonts (see my post with solution her Android 2.3 Hebrew fonts in Webview)
Telling webview to display the string right to left, which I solved by adding
<p dir="rtl">
The last problem is that webview mirrors the text: in other words the first word that should be on the right is the last word on the left and also the letters of that word are flipped, the first letter that should be on the right is the first letter from the left.
BTW, the 2.3 emaulator displays the string correctly if in a TextView.
Any ideas on how to fix #3?
I'm using webview that needs to show a complete hebrew website.
I can tell you that I didn't encounter any problem you have listed, but I DO know that sometimes the os (especially when it's custom) doing some problems with hebrew.
If you want to check it more closely, just download the 3.X (Honeycomb) platform to the sdk manager, and try it again (Honeycomb should have built-in hebrew display, so there shouldn't be any problems. If you want, you can send me the link and il'l check it out.

Categories

Resources