| View previous topic :: View next topic |
| Author |
Message |
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
How do i replace all character 'ы' with 'u' in a String?
Str.replace('ы', 'u');
Does nothing.. |
| |
|
|
|
|
WarChild
Joined: 24 Feb 2006 Posts: 46
|
| Show us the code of the failing test. |
| |
|
|
PaulKolin
Joined: 25 May 2006 Posts: 108
|
Does nothingпјџ
Paste your code |
| |
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| autos, you cannot change a String. |
| |
|
|
PaulKolin
Joined: 25 May 2006 Posts: 108
|
| Str = str.replace |
| |
|
|
plantino
Joined: 13 May 2006 Posts: 96
|
| Doesn't 'replace()" return a new string? |
| |
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
| Ah.. |
| |
|
|
Mupolan
Joined: 30 May 2006 Posts: 101
|
| String s = myString.replaceAll('ы', 'u'); |
| |
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
I dont understand this:
Java.io.IOException: Server returned HTTP response code: 400 for URL: http://blablabla/
The url looks fine to me:s |
| |
|
|
optomeb
Joined: 19 May 2006 Posts: 113
|
| Maybe the space characters need to be escaped |
| |
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
But other urls that looks the same work..
Hmm i see the problem |
| |
|
|
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| HS^, space, the final frontier. |
| |
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
| How do i escape a space? |
| |
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| %20 |
| |
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
I the browser it puts %20 or something
Ok
I just replace spaces wiht %20 |
| |
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| ~javadoc URLEncoder |
| |
|
|
montanarry
Joined: 13 May 2006 Posts: 175
| |
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| You can use either %20 or + |
| |
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
"The space character " " is converted into a plus sign "+". "
Ok |
| |
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| Poolkop, I forget that. ;) |
| |
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
It also encodes: в
Chars like that? |
| |
|
|
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| HS^, did you type some non-ASCII then? |
| |
|
|
Poolkop
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... |
| |
|
|
autos06
Joined: 13 May 2006 Posts: 123 Location: New York
|
| Yes but will so will URLEncoder replace non-ascii ? |
| |
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| HS^: since there is no standard how you encode non-ascii characters... (utf-8? latin-1? <other encoding>?) |
| |
|
|
| Page 1 of 2 |
Goto page 1, 2 Next |
|