Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

spanish email subject with special char is coming as question mark  RSS feed

 
pra akl
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to send email in spanish. but when ever we are having these character's like �, �, �, �, �. i am getting '?' in that character place.

setSubject("Confirmaci�n ");
getting subject as "Confirmaci?n"

I am using Weblogic 10, Oracle 10g and jms server. i am unable to findout where exactly it was failing.

Thanks
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You haven't mentioned what APIs you are using to send Mails. I am moving this to Other Java APIs forum which might be the right place for this.
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, please change your display name as explained here http://www.javaranch.com/name.jsp
Thank you
 
Sivaraman Lakshmanan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pra,
To get the Spanish character, set the Content type in the header to UTF-8.
 
Rob Spoor
Sheriff
Posts: 21047
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And keep in mind that most consoles cannot handle all characters. It may be just the console that is printing the character wrongly. What happens if you use JOptionPane.showMessageDialog to show it:

Swing, including JOptionPane, can handle a lot of characters the console cannot.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!