aspose file tools*
The moose likes Beginning Java and the fly likes the artist formerly known as Prince Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "the artist formerly known as Prince" Watch "the artist formerly known as Prince" New topic
Author

the artist formerly known as Prince

Martin Smith
Greenhorn

Joined: Apr 05, 2003
Posts: 22
What's with the \f formfeed character. When I try to print it I get the symbol for "the artist formerly known as Prince" (as MTV would call him) -- Honest, try it. It's what people on this forum might call foobar.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
Printing "control codes" can get you all sorts of strange looking characters in DOS. Try printing '\u0001' through '\u00031' for some interesting characters.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
Marilyn;

Printing "control codes" can get you all sorts of strange looking characters in DOS. Try printing '\u0001' through '\u00031' for some interesting characters.

I tried looking up 'unicode' in the java docs as well as 'control codes' and found nothing - maybe I have the wrong search criteria. So...
Why do I get the following errors

With this program

Thanks
doco


doco
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi doco,
First, you must have exactly four digits following a unicode escape: '\u0001'. Next, your program isn't going to do what you want anyway. You need to iterate thur chars not Strings. Try this instead:

Michael Morris


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
I figured it out.

doco
Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
Thanks Michael. I had left my post open while I was looking through other resources and posted what I learned before seeing yours. I like yours better.
doco
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: the artist formerly known as Prince
 
Similar Threads
What does the text "Message Edited by ...
Humble Request from the management
Is there FREE web hosting in the internet?
JSTL c:out tag
how to run .asp code using tomcat