redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers

Ask your IT question here

how to replace characters in a string


Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Programming Forums -> JAVA programming forum
View previous topic :: View next topic  
Author Message
autos06
Enthusiastic Coder


Joined: 13 May 2006
Posts: 123
Location: New York
It also encodes: в
Chars like that?

Reply with quote
 
Klimapol
Enthusiastic Coder


Joined: 27 May 2006
Posts: 134
HS^, did you type some non-ASCII then?
Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
HS^, urls are only ascii
if you try to put anything non-ascii into an url you need to encode it...
and then you start having problems...

Reply with quote
 
autos06
Enthusiastic Coder


Joined: 13 May 2006
Posts: 123
Location: New York
Yes but will so will URLEncoder replace non-ascii ?
Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
HS^: since there is no standard how you encode non-ascii characters... (utf-8? latin-1? <other encoding>?)
Reply with quote
 
autos06
Enthusiastic Coder


Joined: 13 May 2006
Posts: 123
Location: New York
Ah.. ok
Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
HS^, tias...
depending on how the client is configured and the web server is configured it may or may not work...
but if the client uses one encoding and the server another then the error is in a the specification beeing to loose

Reply with quote
 
autos06
Enthusiastic Coder


Joined: 13 May 2006
Posts: 123
Location: New York
Doesnt work..
I just rreplace the spaces wih '+'

Reply with quote
 
Klimapol
Enthusiastic Coder


Joined: 27 May 2006
Posts: 134
HS^, only use URLEncoder on those parts of the String that need encoding.
HS^, are you using the encode(String) or encode(String,String)?

Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
HS^, you are having a url and URLEncoder is for "HTML form encoding"
url is not a html form, they may partially use the same encoding....

Reply with quote
 
Page 3 of 4 Goto page Previous  1, 2, 3, 4  Next
Post new topic   Reply to topic    Programming Forums -> JAVA programming forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group