Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Replace à with A using Java code

 
vijay k vemula
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello every one,

First of all i would like to thank you for your previous valuable suggestions. Currently i am working on a Java/JSF application where i got a problem as below.

In our database, we have a special character à (tilde symbol on top of letter A (letter can be any alphabet))......

Now the requirement is i need to replace this special character à with A......

Any advice/suggestion is highly appreciated. Thanks in advance.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
vijay k vemula
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

Thanks for your early response, i really appreciate it. Still i want to explain my requirement clearly as below

Some of the names in our database has these special character (tilde)....like Ñ and ñ, PaulÃ.........

So in the name string, i had to replace these special characters, for example if name comes from database as DOMINOÃ i need to display DOMINO.

could you please advice/suggest me on this.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50241
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What makes you think they are special characters? No Spaniard would think Ñ is a special character. What encoding are you using in your database? Do you have non-English names in your database? Is Dominoã the correct spelling? Can you create a regular expression to apply to the replaceAll() method?

i think this is too difficult a question for "beginning", and shall move this discussion.
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to solve this with Java? Why not write an sql update-statement? I'm no sql guru but I bet that this can be done.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic