You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nigel Blake <ni...@gmail.com> on 2006/04/03 23:43:10 UTC

Character Encoding : Unix vs Windows

Problem : Creating a URL type with parameters that have a space
between them causes an IOException in a javabean when called from
Tomcat 5.0.0.27 on a Unix installation. Using the same bean and JSP
code causes no problem when invoked on the same version of Tomcat on a
Windows installation.

Solutions tried :

1.Ensured that the server connector encoding is UTF-8 (suggested in the FAQ)
2. Have ensured that jsp the page instruction is UTF-8
3. I could turn the bean into a servlet and try using the
setContentType or SetCharacterEncoding. ( I would rather not )

Any suggestions that would make Unix implementation work would be
gratefully received. I have run out of ideas...

Thanks Nigel


Example code :
====================================
URL birdSite = new
URL("http://orientalbirdimages.org/search.php?keyword=black bittern");

try {

      webPageStream = new BufferedReader(new InputStreamReader(birdSite.
          openStream()));
    }
    catch (MalformedURLException ne) {
      System.out.println(
          "Malformed URL Error called from within getPageNumber()" + 
ne.toString());
    }
    catch (IOException ie) {
      System.out.println("IOException called from within
getPageNumber" + ie.toString());
    }

========================================================

The IOException is caught under unix when the variable I pass to the
URL query string has  a query parameter of more than more than 1 word
as in 'black bittern' above.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Character Encoding : Unix vs Windows

Posted by Michael Jouravlev <jm...@gmail.com>.
On 4/3/06, Nigel Blake <ni...@gmail.com> wrote:
> Problem : Creating a URL type with parameters that have a space
> between them causes an IOException in a javabean when called from
> Tomcat 5.0.0.27 on a Unix installation. Using the same bean and JSP
> code causes no problem when invoked on the same version of Tomcat on a
> Windows installation.
>
> Solutions tried :
>
> 1.Ensured that the server connector encoding is UTF-8 (suggested in the FAQ)
> 2. Have ensured that jsp the page instruction is UTF-8
> 3. I could turn the bean into a servlet and try using the
> setContentType or SetCharacterEncoding. ( I would rather not )
>
> Any suggestions that would make Unix implementation work would be
> gratefully received. I have run out of ideas...

URLEncoder.encode(), URLEncoder.decode()

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Character behaviour Unix vs Windows ß

Posted by Tim Diggins <su...@red56.co.uk>.
Hmm, I'm not sure about this in encoding-land, but as a linguist - I 
know that there are (graphically distinct) characters esstset (ß) - used 
in  German for "ss" and beta (β) used in Modern Greek for  the sound 
"v". They look quite similar to each other.

It is fairly legitimate in German orthography to write a esstset as a ss 
- these are entirely equivalent - so maybe some intelligent encoding 
does that for you...

HTH

Tim



birendar.waldiya@tcs.com wrote:
> Hi 
> Any having idea about why  my latin  character    ß  getting converted to 
> 'SS'  all the time however my other character are going smoothly 
> indatabase except above i am trying to insert into data base , I am usign 
> oracle 9i and ISO-8859-1 encoding 
> and this is happening in the unix environment and  not in my pc 
> environment .
> Did anyone face any problem with this character  basically there is 
> similar character in greek to 'β'  , 
> 
> Any pointer please 
> 
> 
> Thanks 
>  
> 
> Birendar Singh Waldiya
> 
> 
> Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information.   If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited.   If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.  Thank you


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Character behaviour Unix vs Windows �

Posted by Mark Thomas <ma...@apache.org>.
When starting a new thread (ie sending a message to the list about a
new topic) please do not reply to an existing message and change the
subject line. To many of the list archiving services and mail clients
used by list subscribers this  makes your new message appear as part
of the old thread. This makes it harder for other users to find
relevant information when searching the lists.

This is known as thread hijacking and is behaviour that is frowned
upon on this list. Frequent offenders will be removed from the list.
It should also be noted that many list subscribers automatically
ignore any messages that hijack another thread.

The correct procedure is to create a new message with a new subject.
This will start a new thread.

Mark
tomcat-user-owner



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Character behaviour Unix vs Windows ß

Posted by bi...@tcs.com.
Hi 
Any having idea about why  my latin  character    ß  getting converted to 
'SS'  all the time however my other character are going smoothly 
indatabase except above i am trying to insert into data base , I am usign 
oracle 9i and ISO-8859-1 encoding 
and this is happening in the unix environment and  not in my pc 
environment .
Did anyone face any problem with this character  basically there is 
similar character in greek to 'β'  , 

Any pointer please 


Thanks 
 

Birendar Singh Waldiya


Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information.   If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited.   If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.  Thank you