Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Browser encoding
SWT Browser encoding [message #896743] Thu, 19 July 2012 14:41 Go to next message
Gerald Radix is currently offline Gerald RadixFriend
Messages: 9
Registered: April 2012
Junior Member
Hello,

After complete downloading page in SWT Browser.
I make a
String html = browser.getText();
to compare with a string who contains an accentuate character : é.

but when i make :
html.lastIndexOf("my string whith é");


It return -1;

(I use mozilla 1.9.8.2 if that help because i don't know if mozilla config or problem with java encoding).

[Updated on: Thu, 19 July 2012 14:47]

Report message to a moderator

Re: SWT Browser encoding [message #896750 is a reply to message #896743] Thu, 19 July 2012 15:16 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi,

does the html page really contains the string "my string whith é"?
Are you really looking for the whole string or just for the "é" character?
Re: SWT Browser encoding [message #896755 is a reply to message #896743] Thu, 19 July 2012 15:33 Go to previous messageGo to next message
Gerald Radix is currently offline Gerald RadixFriend
Messages: 9
Registered: April 2012
Junior Member
Just for the é and all accentuate è, ê, ä...

And the problem is not xulrunner sdk i have try with a browser without xulrunner.

URL : datacet.openlfyers.fr for testing problem.

[Updated on: Thu, 19 July 2012 15:35]

Report message to a moderator

Re: SWT Browser encoding [message #896763 is a reply to message #896755] Thu, 19 July 2012 16:12 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Then you should call
html.lastIndexOf("é")
doesn't you?
Re: SWT Browser encoding [message #896765 is a reply to message #896755] Thu, 19 July 2012 16:13 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Then you should call html.lastIndexOf("é") doesn't you?
Re: SWT Browser encoding [message #897325 is a reply to message #896765] Mon, 23 July 2012 15:21 Go to previous message
Gerald Radix is currently offline Gerald RadixFriend
Messages: 9
Registered: April 2012
Junior Member
My problem is a invisible character who is not a space bar.

My problem is solved, thanks four your help.
Previous Topic:Table cell, controls as content
Next Topic: mandatory text box
Goto Forum:
  


Current Time: Fri Apr 19 02:32:38 GMT 2024

Powered by FUDForum. Page generated in 0.01464 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top