I am getting a text field from a database that includes the Hawai?ian okina. The okina is that opostrophe you see in the word Hawai?i. Only it’s not an apostrophe as it curves in the opposite direction as an apostrophe.
In the flash project I am replacing, ʻ worked when passing xml. In xojo, however, XMLReader just reads it literally and returns ʻ instead of the okina. Just passing the okina results in a quistion mark.
Any suggestions? If all else fails I will us an apostrophe, but that is really bad form here in Hawai?i.
Thanks Tim. Actually I did do some searching with google before I posted here and saw that wiki article. Says what I already know.
Also, please note that I mispoke about flash. Taking another look at my flash app, it is doing the same thing as my xojo app. Wierd that I never noticed the problem before.
Still looking for a solution.
convert the entity (ʻ) manually with some code
could make it replace any entity that is &# preceded since the number is the unicode code point
- strip off the &#
- get the value
- return Encodings.UTF8.Chr(value)
dim entity as string = “ʻ”
dim s as string
s = replaceall(entity, “&#”, “” )
dim value as integer = val(s)
dim char as string = Encodings.UTF8.Chr(value)
Generalizing this into a general purpose "entity conversion routine" is left as an exercise for the reader :P
Norman, Thanks! That did the trick. I created a method called Okina…
Then just pass the incoming text to it.