Re: Filtering only punctuation and currency

From: Michael Borgwardt (brazil_at_brazils-animeland.de)
Date: 11/19/04


Date: Fri, 19 Nov 2004 19:03:40 +0100

Glenn Meter wrote:
> I've got a case where I want to build a MaskFormatter that only accepts
> punctuation and currency symbols.
>
> In looking at the APIs, it seems easy to test if a character is a
> punctuation or currency symbol. But I'm not finding APIs to get the list
> of punctuation and currency symbols programatically. I just need
> something that will return the characters as a String. It seems like
> this should be easy. What stupid thing am I missing?

That's just not how the characters and character classes are
defined in Unicode or Java.

But it's simple enough to loop over all the 2^16 Java chars,
call the classification methods in java.lang.Character for
each of them and build the String for yourself.

Do that once and save the result in a file somewhere.



Relevant Pages

  • Re: Filtering only punctuation and currency
    ... >> punctuation and currency symbols. ... >> of punctuation and currency symbols programatically. ... > That's just not how the characters and character classes are ... Determines if the specified character is an ISO control ...
    (comp.lang.java.programmer)
  • Filtering only punctuation and currency
    ... punctuation and currency symbols. ... it seems easy to test if a character is a ... But I'm not finding APIs to get the ... list of punctuation and currency symbols programatically. ...
    (comp.lang.java.programmer)
  • Re: Track Changes VBA Granular information needed
    ... MsgBox "Deleted Period" ... Add more ElseIf clauses for any other punctuation you want to catch. ... one character) will show up in the table column that contains .Range.Text. ... Since Track Changes creates a Delete Bubble on the document, ...
    (microsoft.public.word.vba.beginners)
  • Re: Guy Macons adventures with ASCII character frequency
    ... > I want a list that includes the space, punctuation, ... > numerals, upper case and lower case, not just letters. ... If you want to determine relative character frequencies ... is easy to do so with a simple computer program. ...
    (sci.crypt)
  • Strange range behavior in a case statement
    ... versions of bash or bourne shell: ... worked on SuSE Linux. ... Every character caused the loop to break. ... not specify a range using punctuation symbols (any ...
    (comp.unix.shell)