First page Back Continue Last page Overview Text


In addition to being able to handle approximate numeric and date values, we have also implemented a digit converter class that converts numerals written in other scripts to common Arabic-Indic digits. Thus, as shown here, UTF-8 strings containing dates of birth written in other scripts can be passed directly to the set() method or constructor of the Date class. The DigitConverter class first performs a low-cost check of whether the string contains UTF-8 versus plain ASCII. If the string contains only ASCII, nothing needs to be done and the DigitConverter simply returns the string unchanged, thus minimizing overhead while still handling Unicode data in a seamless manner.