Rusty Well-Known Member Licensed User Longtime User Nov 1, 2013 #1 I am trying to convert a series of values similar to this: 17e6, 17e7... (Khmer characters) into their corresponding "displayable" text. I have loaded the font into the typeface of a view but don't know how to convert the hex into a CHR(17e6) type value that can be used. Any advice would be appreciated. Thanks, Rusty I was able to display the "base" unicode character by: Code: Copy t = "17e6" Log("final: " & Chr(Bit.ParseInt(t, 16))) This results in: final: ៦ Which is the desired result. Does anybody know how to combine consonants/vowels (modifiers) to the unicode characters? i.e. ឆឿ is made up of unicode characters 17bf (ឆ) and 1786 (ឿ) Thanks for any advice! Rusty Last edited: Nov 1, 2013
I am trying to convert a series of values similar to this: 17e6, 17e7... (Khmer characters) into their corresponding "displayable" text. I have loaded the font into the typeface of a view but don't know how to convert the hex into a CHR(17e6) type value that can be used. Any advice would be appreciated. Thanks, Rusty I was able to display the "base" unicode character by: Code: Copy t = "17e6" Log("final: " & Chr(Bit.ParseInt(t, 16))) This results in: final: ៦ Which is the desired result. Does anybody know how to combine consonants/vowels (modifiers) to the unicode characters? i.e. ឆឿ is made up of unicode characters 17bf (ឆ) and 1786 (ឿ) Thanks for any advice! Rusty
Erel B4X founder Staff member Licensed User Longtime User Nov 3, 2013 #2 Code: Copy Dim t as Int = 0x17e6 Log("final: " & char(t)) 'should be chr but the forum doesn't like chr in this case :( Upvote 0
Code: Copy Dim t as Int = 0x17e6 Log("final: " & char(t)) 'should be chr but the forum doesn't like chr in this case :(
Rusty Well-Known Member Licensed User Longtime User Nov 3, 2013 #3 Thanks Erel. I figured this out with your help from another post http://www.b4x.com/android/forum/threads/when-getting-query-results-i-cant-read-hebrew.27461/#post-159533. In the mentioned post, you were assisting Danoptic with Greek letters. by calling your routine UnescapeUnicode as follows: Code: Copy Log(UnescapeUnicode("this is 4 a test \u1786\u17bf")) 'in this order, not \u17bf\u1786 it will combine these types of characters appropriately. unicode characters 1786 (ឿ) and 17bf (ឆ) results in ឆឿ Big thanks Erel Additional (easier) note: Code: Copy Dim t As Int = 0x1786 Dim s As Int = 0x17bf Log("final: " & Chr(t) & Chr(s)) the above works as well Last edited: Nov 3, 2013 Upvote 0
Thanks Erel. I figured this out with your help from another post http://www.b4x.com/android/forum/threads/when-getting-query-results-i-cant-read-hebrew.27461/#post-159533. In the mentioned post, you were assisting Danoptic with Greek letters. by calling your routine UnescapeUnicode as follows: Code: Copy Log(UnescapeUnicode("this is 4 a test \u1786\u17bf")) 'in this order, not \u17bf\u1786 it will combine these types of characters appropriately. unicode characters 1786 (ឿ) and 17bf (ឆ) results in ឆឿ Big thanks Erel Additional (easier) note: Code: Copy Dim t As Int = 0x1786 Dim s As Int = 0x17bf Log("final: " & Chr(t) & Chr(s)) the above works as well