aspose file tools*
The moose likes JSP and the fly likes Spaces are getting converted to  characters. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Spaces are getting converted to  characters." Watch "Spaces are getting converted to  characters." New topic
Author

Spaces are getting converted to  characters.

Shifali Rana
Greenhorn

Joined: Jul 08, 2010
Posts: 11
Hello,

Whenever I am trying to save the words that are copied from MS Word to jsp text box in the database(MySQL) the spaces are getting converted to  characters.

I am using the following line in the jsp page may be it is converting the spaces to these characters.

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Is the charset UTF-8 is need to be set for the Table column.

Why the spaces are getting converted to  characters when they saved in the database? Please help.


Thank You




William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
What you see in WORD as a space is not really an ASCII space - the characters are not being converted, Word is supplying them.

Microsoft WORD does all sorts of tricks with punctuation and other character - for example "smart punctuation." This creates a ghastly problem for programmers.

It is possible to force Word to save as text with conversion to a regular character set.

Using a programmer's editor that can display the hex values of characters you can figure out what Word is actually writing and how to change the characters to normal ASCII or UNICODE.

Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spaces are getting converted to  characters.
 
Similar Threads
How to fix . . . .?
displaying special characters on struts:jsp page
Problem while storing Japanese characters in Oracle 9i
How to set Multilanguage Subject in Javax.mail
extraneous characters getting introduced in XML