The moose likes Servlets and the fly likes Spaces replaced by Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Spaces replaced by "?" " Watch "Spaces replaced by "?" " New topic

Spaces replaced by "?"

Hemanth Ramamoorthy

Joined: Aug 30, 2004
Posts: 2
I am using JSP (for capturing inputs) and Servlets (to get the values from the request and do some processing) - WAS server is 5.1.1

The spaces in the data (say for a field where the input is "Hemanth Ramamoorthy") are replaced by "?" (Question mark - excluding the quotes). Why does this happen? Believe me, its not always - 1 in 100 or 200 times - this happens. I have set response character encoding to 8859_1
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
have you tried the same thing with default encoding. why you want this particular encoding? why it is needed.

or you can try the same thing with some other server i.e. TOMCAT 5.0 or earlier
[ August 30, 2004: Message edited by: adeel ansari ]
Hemanth Ramamoorthy

Joined: Aug 30, 2004
Posts: 2
We are using German characters in our applications. And we have to stick to WAS 5.1.1
Hence no way to change these things.
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
ASCII 32 is a space. I believe that ASCII 160 is also a space (used to be a shift-space on one computer I used). Maybe the occasional odd space in your data is an ASCII 160 which doesn't enjoy the translation to a different character set???

Having said that, I don't know enough about character sets or your set-up to be able to offer any helpful advice.

I agree. Here's the link:
subject: Spaces replaced by "?"
jQuery in Action, 3rd edition