Flutter bangla font not supported, getting from apis, showing only symbols of bangla font - android

I am not able to parse bangla font , called api for getting content , where some of bangla content, but not getting bangla, showing some symbolse, how i get rid of this ? symbols like "¦®à¦¾à¦²à¦¿à¦à¦¾à¦¨à¦¾à¦§à§à¦¨, যার নিবনà§à¦§à¦¿à¦¤ à¦à¦«à¦¿à¦¸
হাà¦à¦¸: ২৬৪/বি, পশà§à¦à¦¿à¦® মানিà¦à¦¦à§, ঢাà¦à¦¾ à¦à§à¦¯à¦¾à¦¨à§à¦à¦¨à¦®à§à¦¨à§à¦,
ঢাà¦à¦¾-১২০৬ (নিবনà§à¦§à¦¨ নমà§à¦¬à¦°: ১৮৩৬৫৩) ঠà¦à¦¬à¦¸à§à¦¥à¦¿à¦¤à¥¤ à¦à¦®à¦¾à¦¦à§à¦° à¦-à¦à¦®à¦¾à¦°à§à¦¸ পà§à¦°à§à¦à¦¾à¦²à§à¦° à¦à¦¯à¦¼à§à¦¬à¦¸à¦¾à¦"
i tried, but not able to get rid of,

Related

Issue with float.Parse in Unity Android App

I develop an Android app. If I call
float.Parse("51.552058")
in Editor or App on my Mac Book (Language Setting English), it works fine. After publishing to Android (Language Setting German) the result of the Parse operation is not "51.552058" anymore but "5,155211E+09". I understand that this might be related to the device's language but I still don't really understand what is happening and why.
I also tried following with no success:
float.Parse("51.552058", System.Globalization.NumberStyles.Any)
float.Parse("51.552058", System.Globalization.NumberStyles.AllowDecimalPoint)
Did anyone stumble over this before?
float.Parse is culture dependent.
See e.g. from NumberFormatInfo
// '1,034,562.91' --> 1034562.91 (en-US)
// '1,034,562.91': FormatException (fr-FR)
// '1,034,562.91' --> 1034562.91 (Invariant)
Reason here is that in EU cultures the , is usually the decimal separator while the . is used as the group separator. So from the example above the correct format for fr-FR would be 1.034.562,91
You probably rather want to use CultureInfo.InvariantCulture like
float.Parse("51.552058", CultureInfo.InvariantCulture);
or directly NumberFormatInfo.InvariantInfo
float.Parse("51.552058", NumberFormatInfo.InvariantInfo);
which simply has defined
NumberDecimalSeparator .
NumberGroupSeparator ,

Format a string with html elements in react native

I am trying to create a component to display some generic product info. The string is formatted by a CRM so it has HTML elements in it "<BR>, <b> </b> etc.
eg:
"<BR>Łosoś to<b> szlachetna ryba,</b> można z niej przyrządzać przepyszne dania główne, genialne przystawki, a także niezwykle smaczne pasztety i farsze. Doskonale nadaje się do<b> pieczenia, smażenia, duszenia i grillowania. <BR><BR>Trym D:</b> Usunięty kręgosłup, ości brzuszne, tylne płetwy, kość obojczyka, tłuszcz na płetwie brzusznej usunięty częściowo, usunięte ości, ścięty ogon, usunięta otrzewna.<BR>"
I want to format the string so it renders properly in react native.
I tried using ramda's replace and it worked for adding new lines /n however I do not think this will work for making the text bold.
is there some library that will format strings with html elements into a react native friendly format?

Displaying Unicode string in Users control in Xamarin (Android)

Basically, i have a list of Nepali Unicode strings something like {"युनिकोड १ ","युनिकोड २","युनिकोड ३"}.
Now, Firstly, I have a text view in Xamarin (Android) and tried to set the text property using couple of methods:
UnicodeTextView.Text="युनिकोड १"; //direct method
var font = Typeface.CreateFromAsset(_activity.Assets, "kantiput.TTF");//kantiput.TTF Is a Nepali font.
UnicodeTextView.Typeface = font;
var font = Typeface.CreateFromAsset(_activity.Assets, "kantiput.TTF");
UnicodeTextView.SetTypeface(font, TypefaceStyle.BoldItalic);
and none of them worked.
When using the first option nothing was displayed, and on working with last two
and there were some BOX character visible.
For first case when i directly tried to set the value:
Before setting value:
After setting value:
Samething with the ListAdapter.
Can anyone suggest me how can we display unicode sentences in TextView, EditText, Toast ?
I want result something like this :
with TextView :
and here is the weird behavior :
and i tried all those code that are in comment too. Still didn't find any luck.
I am working in android.
In toast I checked like the following:
Toast.makeText (this, "\u0c05 \u0c06", Toast.LENGTH_SHORT).Show();
For first two letters of Telugu alphabet s. It worked.
If you have the font file you can obtain unicode codes for the various glyphs in the online software available at
https://opentype.js.org/index.html
Under page glyph inspector.
I tested your code, the first direct method UnicodeTextView.Text="युनिकोड १"; works fine by my side both with single TextView or TextView in ListView.
Or you may try this code:
if (Android.OS.Build.VERSION.SdkInt >= Android.OS.Build.VERSION_CODES.N)
{
UnicodeTextView.Text = Android.Text.Html.FromHtml("युनिकोड १", Android.Text.FromHtmlOptions.ModeLegacy).ToString();
}
else
{
UnicodeTextView.Text = Android.Text.Html.FromHtml("युनिकोड १").ToString();
}

how to make gujrati font supported in android app

i'm going make a web site in which i have lots of Gujarati language text.
i found that in many cell phones (Micromax canvas2,etc) Gujarati language is not supported.
so i'm thinking to make a web browser in android which support Gujarati font. so user can use that my web site through my android browser.
plzz help me quickly
Few devices doesn't support Gujarati language packs.
You need to define css and apply it to your webview.
Below post may help you as well.
Android 2.2 webview not supporting Tamil font
Hi Try this this will work fine
TextView mtxt = (TextView) findViewById(R.id.action_settings);
Typeface face1 = Typeface.createFromAsset(getAssets(),
"Lohit-Gujarati.ttf");
mtxt.setTypeface(face1);
mtxt.setText("પૂર્વ વડાપ્રધાન રાજીવ ગાંધીની હત્યા કરનારા 3 આરોપીઓની ફાંસીની સજા સુપ્રિમ કોર્ટે ઉમ્રકેદમાં ફેરવી નાંખી છે.આમ રાજીવગાંધીના" +
"3 હત્યારાઓને હવે ફાંસીની સજા નહી થાય.સુપ્રીમ કોર્ટમાં 3 જજોની બેન્ચે આજે આ ચુકાદો આ");

Rendering HIndi font on Android 2.3 and lower

I am developing an android App in Hindi but find that few characters are misspelled and broken in Hindi the issue is in http://code.google.com/p/ankidroid/issues/detail?id=1008 but no solution there दिप is rendered as दपि
letters in hindi font above are formed as द + ि + प which should display as दिप but It render as दपि
The same question was put earlier but not resolved so I had to repost it again
Correcting Hindi (Unicode) rendering in Android
Finally I found the solution this is very simple just import the font in my case I am developing web app
#font-face { font-family: hindi; src: url('fonts/k010.TTF'); }
body,h1,h2{ font-family:hindi; }
then type text in your a text editor or MS-word using Kruti devi10 font after You finished change the font to Arial and paste the text in your web App and it will render perfectly
you can use Unicode ...
TextView tv=(TextView)findViewById(R.id.textViewmyView);
final Typeface tf = Typeface.createFromAsset(this.getAssets(), "Hindi-SARAL1.TTF");
tv.setText(Html.fromHtml("&# 2367;&# 2342;&# 2346;"));
tv.setTypeface(tf);
unicode value continues no gap.....
and you can also convert world to unicode via this site...http://mylanguages.org/converter.php but in case of इ 1st use unicode of इ then alphabets Unicode...b/c till android version 4.0 Hindi Unicode not supported proper..

Categories

Resources