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 10:41 Go to next message
Gerald Radix is currently offline Gerald Radix
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 10:47]

Report message to a moderator

Re: SWT Browser encoding [message #896750 is a reply to message #896743] Thu, 19 July 2012 11:16 Go to previous messageGo to next message
Jan Krakora is currently offline Jan Krakora
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 11:33 Go to previous messageGo to next message
Gerald Radix is currently offline Gerald Radix
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 11:35]

Report message to a moderator

Re: SWT Browser encoding [message #896763 is a reply to message #896755] Thu, 19 July 2012 12:12 Go to previous messageGo to next message
Jan Krakora is currently offline Jan Krakora
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 12:13 Go to previous messageGo to next message
Jan Krakora is currently offline Jan Krakora
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 11:21 Go to previous message
Gerald Radix is currently offline Gerald Radix
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: Mon Sep 01 22:04:36 EDT 2014

Powered by FUDForum. Page generated in 0.02456 seconds