goaganesha
Programmer
Hello,
I have to import text with special characters like ë from a mysql database. I want to test the string, in which I put the text, for these special characters but somehow these characters seem to be converted to a question mark before I have the chance to test for them. The special characters are never found and a questionmark is replacing them when i display them in the console window.
For testing I've put an ë in the database.
this is the method that i'm using:
I also replaced the ë with \u00eb and it gives the same result.
Any suggestions?
regards, goaganesha
I have to import text with special characters like ë from a mysql database. I want to test the string, in which I put the text, for these special characters but somehow these characters seem to be converted to a question mark before I have the chance to test for them. The special characters are never found and a questionmark is replacing them when i display them in the console window.
For testing I've put an ë in the database.
this is the method that i'm using:
Code:
public String convertPlainToHtml(String input)
{
System.out.println("================="+input);
if (input.trim().indexOf('ë',0) != -1)
{
System.out.println("found one");
String temp="ë";
String html="euml";
input.replaceAll(temp,html);
}
else
{
System.out.println("not found");
}
return input;
}
This is the console output I get:
================?
not found
Any suggestions?
regards, goaganesha