ReplaceAll not working for trademark

Sorry, my last post was unclear due to the html in the browser changing it.this.alertTextSuffix = replaceAll("?, "ampersand trade;");The ?symbol is not recognized by java and I am getting a replace.What do I need to do?
[247 byte] By [Rachel_Ka] at [2007-11-27 7:12:32]
# 1

No need to start a new thread! This also works for meString s = "a b c d e";

System.out.println(s);

s = s.replaceAll("b|d","?);

System.out.println(s);

s = s.replaceAll("?, "xxxx");

System.out.println(s);

sabre150a at 2007-7-12 19:03:39 > top of Java-index,Java Essentials,Java Programming...
# 2
When I read your string in it comes across as 鈩?br>However when I read my string in it comes across as ?and will not convert.What can I do?
Rachel_Ka at 2007-7-12 19:03:39 > top of Java-index,Java Essentials,Java Programming...
# 3
My string is coming across from an oracle database.
Rachel_Ka at 2007-7-12 19:03:39 > top of Java-index,Java Essentials,Java Programming...
# 4
> When I read your string in it comes across as 鈩?br>> > However when I read my string in it comes across as ?br>> and will not convert.I don't understand what you mean by 'read'! 'read' from where and how?
sabre150a at 2007-7-12 19:03:39 > top of Java-index,Java Essentials,Java Programming...
# 5
you might have better luck if you use the hex encoding of the tm sign, and you will likewise need to have the other string, where the replacement happens be in hex, or some format which doesnt care about encoding. FileInputStream is your friend
mkoryaka at 2007-7-12 19:03:39 > top of Java-index,Java Essentials,Java Programming...
# 6

Heres an idea. Why dont you check your String encoding?

http://mindprod.com/jgloss/encoding.html

And then, use its unicode (or whatever) number in the regex instead

of the actual symbol.

Also, different fonts might have symbols in different places.

In Windows:

Start > All Programs > Accessories > System Tools > Char Map

For me: TM = U+2122 / ALT+0153 in Arial

TuringPesta at 2007-7-12 19:03:39 > top of Java-index,Java Essentials,Java Programming...