/**
* Check to make sure that wide characters are converted when going to narrow scripts.
*/
public void TestForWidth(){
Transliterator widen = Transliterator.getInstance("halfwidth-fullwidth");
Transliterator narrow = Transliterator.getInstance("fullwidth-halfwidth");
UnicodeSet ASCII = new UnicodeSet("[:ascii:]");
String lettersAndSpace = "abc def";
final String punctOnly = "( )";
String wideLettersAndSpace = widen.transform(lettersAndSpace);
String widePunctOnly = widen.transform(punctOnly);
assertContainsNone("Should be wide", ASCII, wideLettersAndSpace);
assertContainsNone("Should be wide", ASCII, widePunctOnly);
String back;
back = narrow.transform(wideLettersAndSpace);
assertEquals("Should be narrow", lettersAndSpace, back);
back = narrow.transform(widePunctOnly);
assertEquals("Should be narrow", punctOnly, back);
Transliterator latin = Transliterator.getInstance("any-Latn");
back = latin.transform(wideLettersAndSpace);
assertEquals("Should be ascii", lettersAndSpace, back);
back = latin.transform(widePunctOnly);
assertEquals("Should be ascii", punctOnly, back);
Transliterator t2 = Transliterator.getInstance("any-Han");
back = t2.transform(widePunctOnly);
assertEquals("Should be same", widePunctOnly, back);
}