[progress Communities] [progress Openedge Abl] Forum Post: Re: Is There A Plain Ascii...

Status
Not open for further replies.
G

Garry Hall

Guest
I don't believe we have something like this in OE. One thought would be your own case-mapping table, but that would mean your entire session has to run like that, which might have unintended consequences elsewhere. If you are using a single-byte codepage, you are probably better off providing your own function to scan through the string char by char, and provide the mapping yourself. You might be able to use collations to speed this up, as a lot of the collations map the accented chars to the base char. I can expand on this if you are interested. If you are looking for a more Unicode approach (you are using -cpinternal UTF-8), another thought would be to NORMALIZE your string to NFD or NFKD, then scan through character by character, and skip any char that is not an ASCII character. Theoretically, at least, I have not tried this in practice. It would mean you would skip any chars that are not accented ASCII (e.g. Cyrillic, Thai, Japanese etc), but maybe for your purpose this is acceptable. A more robust approach would be to call the ICU libraries directly (Google suggests ways to do this, using a Transliterator).

Continue reading...
 
Status
Not open for further replies.
Top