Hawaiian ʻ the okina in hawaiian does not work using XMLReader

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.

John

Maybe this will help: https://en.wikipedia.org/wiki/?Okina#Unicode

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 (&#699) 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)

[code]
dim entity as string = “&#699

dim s as string

s = replaceall(entity, “&#”, “” )

dim value as integer = val(s)

dim char as string = Encodings.UTF8.Chr(value)

break[/code]

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…

return ReplaceAll(textToCheck,"ʻ",Encodings.UTF8.Chr(699))

Then just pass the incoming text to it.

Works great.

John