I am trying to display utf16 characters that are above 65000 and having difficulty getting it done.
FE4E6 is the American Flag (as an example).
How does one display this in a Webview, EditText or ???
Thanks in advance.
Rusty
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
WebView1.LoadHtml("<p>󾓦</p>")
EditText1.Text = UnicodeToString(0xFE4E6)
End Sub
Sub UnicodeToString (codepoint As Int) As String
Dim bc As ByteConverter
Dim b() As Byte = bc.IntsToBytes(Array As Int(codepoint))
Return BytesToString(b, 0, 4, "UTF32")
End Sub
Thanks Erel!
This looks like it runs on KitKat very well. Can it function on ICS or JellyBean?
Rusty
I tried it on ICS and it doesn't seem to work. Does ICS support the UTF16/32?
In ICS, the B-) generates a Unicode character and this is working well. The edit text shows the correct smiley.
How can I get the Unicode code point value? Is there a translation table for these texts? If so, it seems they vary between Android OS's...ICS, JB, ...
The reason I need this is that I can't find a "map" that gives the code point value for the text representations (like above).
The editor-app for sms (or whatever you are looking at) seems to have the maps hardcoded...
I dont know whether there exist an mapping for text-smilies to graphics.
Does anyone know how/where/which codepage/unicode values the Korean character set resides?
If so, can you please advise on how I might reach this in code?
Thanks,
Rusty
Thanks Erel.
I need t be able to "combine" Unicode characters such as Korean where selecting consonants and vowels result in a single combined ligature/glyph.
Does android/b4a support this function or is there a "formula" by which this can be accomplished?
for example: ㅁ plus ㅕ results in the character 며 adding another ㅁ results in 몀
Regards,
Rusty
Nothing wrong with being RUSTY, I've been that for my whole life
Thanks for the speedy response.
Do you know how to "Add" the consonant value to the vowel value that points to the codepage/glyph with the resultant character?
Thanks,
Rusty
Dim s As String = "ㅁㅕ"
Dim jo As JavaObject
jo.InitializeStatic("java.text.Normalizer")
For Each form As String In Array("NFD", "NFC", "NFKD", "NFKC")
Log(jo.RunMethod("normalize", Array(s, form)))
Next
Are there other "formats" for normalize?
Some of the combinations have multiple "pieces" i.e. "ㅁ", "ㅕ", "ㄱ" result in 멱
When I send it an array of three elements, it doesn't combine all three, just the first two and then sets the third as an independent character.
THanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.