Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Special Characters

 
Mini Pilla
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK...is it me or something else....

If someone copies �(Trademark) from word doc to a textfield and when I try to save that value in the DB, it converts into a '?'.

Then I tried to a round about, used the following replace function in javascript before submitting the form.

var r = replace(t, '�', '& # 1 5 3;');--numeric value

But this doesnot work, it refuses to identify � in the string entered by user.

Any light on this wil be GREATLY appreciated......

I wasted like 24 hrs on this....

Thanks
Rajani

[ June 14, 2006: Message edited by: Rajani Katta ]
[ June 14, 2006: Message edited by: Rajani Katta ]
 
Mini Pilla
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind.....I got it

var r = w.replace('�', String.fromCharCode(153));
[ June 15, 2006: Message edited by: Rajani Katta ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic