Re: Problem with character encoding during redirect to another action

2011-01-26 Thread li wei

I think this is not a struts issue.

are you using tomcat as your server?
you can try to set URIEncoding of Connector to "utf-8" in server.xml

(2011/01/26 23:45), Rafael Karbowski wrote:

Hi @ all,



I have a problem with the encoding of German umlauts. In the getter of the 
source action they are correct,

but the setter of the destination action sets bad encoded values. So far I 
canĀ“t find any solution for this problem.

It would be nice, if somebody has an idea how to fix it.



For a detailed description see

http://stackoverflow.com/questions/4791166/struts-2-parameter-coding-problem-during-redirect-to-another-action



Best Regards

Rafael









-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Problem with character encoding.

2006-03-21 Thread Anjishnu Bandyopadhyay
Hi Dan,

Both are on Windows.

With best regards,
Anjishnu.

-Original Message-
From: Dan Jas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 9:45 PM
To: Struts Users Mailing List
Subject: Re: Problem with character encoding.

Are you using WSAD on Windows and Tomcat on Unix/Linux?


- Original Message - 
From: "Anjishnu Bandyopadhyay" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, March 21, 2006 5:51 AM
Subject: Problem with character encoding.



Hi all,



I am generating a MS Word document through a JSP, by setting the JSP's
content type as "application/msword;".

The ".doc" that is generated contains accentuated French characters
(special French characters).



I use Websphere (WSAD) to develop the code, but use Tomcat server for
deployment & final testing.

In WSAD, the ".doc" file that is generated properly displays the special
characters. But, in Tomcat, these characters are broken (distorted).



The code snippet (in JSP) is as follows:

<%@ page language="java" contentType="application/msword; charset=UTF-8"
pageEncoding="UTF-8" %>

<%

  String fileName = "abc.doc";

  response.setContentType("application/msword");

  response.setLocale(java.util.Locale.FRENCH);

  response.setHeader("Content-Disposition","attachment;filename="+
fileName);

%>



Can anyone give me some pointer, regarding the problem might be? Am I
missing out something?



Thanks for your time.



With best regards,

Anjishnu.





 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely 
for the use of the addressee(s). If you are not the intended recipient, 
please notify the sender by e-mail and delete the original message.
Further, 
you are not to copy, disclose, or distribute this e-mail or its contents
to 
any other person and any such actions are unlawful. This e-mail may
contain 
viruses. Infosys has taken every reasonable precaution to minimize this 
risk, but is not liable for any damage you may sustain as a result of
any 
virus in this e-mail. You should carry out your own virus checks before 
opening the e-mail or attachment. Infosys reserves the right to monitor
and 
review the content of all messages sent to or from this e-mail address. 
Messages sent to or from this e-mail address may be stored on the
Infosys 
e-mail system.
***INFOSYS End of Disclaimer INFOSYS*** 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with character encoding.

2006-03-21 Thread Dave Newton
Anjishnu Bandyopadhyay wrote:
> I am generating a MS Word document through a JSP, by setting the JSP's
> content type as "application/msword;".
>   

I really don't understand why you persist in thinking that _calling_
something a Word document _makes_ it a Word document. As I have stated
several times a Word document is a _binary_file_format_.

What are you using to generate the Word document? If you're just
outputting an HTML template (e.g. a standard JSP template) you are NOT
generating a Word document. If you are using a particular library to
properly generate a Word document you'll probably want to ask on a list
for that library.

Dave



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with character encoding.

2006-03-21 Thread Dan Jas

Are you using WSAD on Windows and Tomcat on Unix/Linux?


- Original Message - 
From: "Anjishnu Bandyopadhyay" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, March 21, 2006 5:51 AM
Subject: Problem with character encoding.



Hi all,



I am generating a MS Word document through a JSP, by setting the JSP's
content type as "application/msword;".

The ".doc" that is generated contains accentuated French characters
(special French characters).



I use Websphere (WSAD) to develop the code, but use Tomcat server for
deployment & final testing.

In WSAD, the ".doc" file that is generated properly displays the special
characters. But, in Tomcat, these characters are broken (distorted).



The code snippet (in JSP) is as follows:

<%@ page language="java" contentType="application/msword; charset=UTF-8"
pageEncoding="UTF-8" %>

<%

 String fileName = "abc.doc";

 response.setContentType("application/msword");

 response.setLocale(java.util.Locale.FRENCH);

 response.setHeader("Content-Disposition","attachment;filename="+
fileName);

%>



Can anyone give me some pointer, regarding the problem might be? Am I
missing out something?



Thanks for your time.



With best regards,

Anjishnu.





 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, 
please notify the sender by e-mail and delete the original message. Further, 
you are not to copy, disclose, or distribute this e-mail or its contents to 
any other person and any such actions are unlawful. This e-mail may contain 
viruses. Infosys has taken every reasonable precaution to minimize this 
risk, but is not liable for any damage you may sustain as a result of any 
virus in this e-mail. You should carry out your own virus checks before 
opening the e-mail or attachment. Infosys reserves the right to monitor and 
review the content of all messages sent to or from this e-mail address. 
Messages sent to or from this e-mail address may be stored on the Infosys 
e-mail system.
***INFOSYS End of Disclaimer INFOSYS*** 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with character encoding.

2006-03-21 Thread Antonio Petrelli

Anjishnu Bandyopadhyay ha scritto:

Hi all,

I am generating a MS Word document through a JSP, by setting the JSP's
content type as "application/msword;".
  


Are you using a particular library to generate the file? Anyway 
generating an MS Word file through JSP seems odd to me...



The ".doc" that is generated contains accentuated French characters
(special French characters).
...

In WSAD, the ".doc" file that is generated properly displays the special
characters. But, in Tomcat, these characters are broken (distorted).
  


Maybe I am missing something. Does WSAD have something native that 
handles MS Word files? Because Tomcat doesn't!
Anyway, the character set (UTF-8) has nothing to do with the final 
generated file (for the browser it should be a binary file, that must be 
handled by a plugin or an external application).

Ciao
Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]