Re: Umlauts in cocoon 2.0.2

2002-11-11 Thread Joerg Heinicke
Hello,

the problem is mostly, that Cocoon expects by default encoding 
ISO-8859-1, but gets UTF-8 request. In which encoding are your documents 
served to the browser? I guess UTF-8, so the browser requests also in UTF-8.

So you must either change the encoding of the served documents or 
Cocoon's expectation regards the encoding of a request.

Regards,

Joerg

Braun wrote:
I have the problem with german Umlauts in request parameters.
When I transfer german Umlauts by request paramaters cocoon doesn't 
decode the Umlauts encoding when I use these Umlauts in my xml-documents 
or stylesheets.
I set already all my encodings to ISO-8859-1.


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-11-11 Thread Boris Althaus





  SUMMARY from 28. October
   
   
  - Original Message - 
  From: 
  Bert Van Kets 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Monday, October 28, 2002 1:48 
  PM
  Subject: [SUMMARY] Encoding form 
  data
  Cocoon does not support non-US characters when posting data to 
  the server.Characters like è (e accent grave) are translated to two 
  strange characters when  checking the posted data.iso-8859-1 is 
  the default encoding for Cocoon and it does support all necessary West 
  European characters (thanks to Bruno for pointing this out).  You can 
  find out more on iso-8859-1 on http://www.bbsinc.com/iso8859.htmlIf 
  you need support for other characters you will need to replace iso-8859-1 
  with UTF-8 which has Unicode support.  More on UTF can be found at http://www.columbia.edu/kermit/utf8.htmlWhen 
  you create a webform and post to a pipeline that has a request generator 
  and an XML serializer you will see that posted data is not correctly 
  presented.  To correct this you need to add the 
  request.setCharacterEncoding method to set the encoding for the request 
  data.  This method is captured in the setCharacterEncodignAction 
  action.To use it simply addsrc="org.apache.cocoon.acting.SetCharacterEncodingAction"/>to 
  the action component blockThen add this at the beginning of every 
  pipeline that catches requested non-ASCII 
  data    
   
  Of course you need to replace "iso-8859-1" with 
  "UTF-8" if you need to use that encoding.Another important thing 
  is that you must make sure the data is sent out to the browser with the 
  correct encoding in the first place.  To achieve this add the 
  encoding to the XML and the (x)html serializers.src="org.apache.cocoon.serialization.HTMLSerializer" pool-grow="4" 
  pool-max="32" pool-min="4" 
  logger="sitemap.serializer.html">    
  1024    
  iso-8859-1This 
  should do it!Have fun.BertThis mail is written in 
  100% recycled 
  electrons.-Please 
  check that your question  has not already been answered in theFAQ 
  before posting. <http://xml.apache.org/cocoon/faq/index.html>To 
  unsubscribe, e-mail: <[EMAIL PROTECTED]>For 
  additional commands, e-mail:   <[EMAIL PROTECTED]>

  - Original Message - 
  From: 
  Sternath Elmar 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Monday, November 11, 2002 8:36 
  AM
  Subject: AW: Umlauts in cocoon 
2.0.2
  Hi Braun,I wrote an action to encode the request params 
  before accessing them in the sitemap:public class 
  RequestEncodedParamAction extends ComposerAction implements ThreadSafe 
  {    public final static String 
  MAP_URI = 
  "requestURI";    public final static String 
  MAP_QUERY   = 
  "requestQuery";    public final static String 
  MAP_CONTEXTPATH = "context";    public final static 
  String PARAM_PARAMETERS = "parameters";    public final 
  static String PARAM_DEFAULT_PREFIX = "default.";    
  public Map act( Redirector redirector, SourceResolver resolver, Map 
  objectModel, String source, Parameters param 
  )    throws 
  Exception    
  {    Request request = 
  (Request) 
  objectModel.get(Constants.REQUEST_OBJECT);    
  if (request == null) 
  {  
  getLogger().error("RequestInfoAction: no request 
  object!");  
  return(null);    
  }    Map map = new 
  HashMap();    map.put(MAP_URI, 
  request.getRequestURI());    
  String query = 
  request.getQueryString();    if 
  (query != null && query.length() > 
  0){  
  map.put(MAP_QUERY, "?" + query);    
  }    
  else{  
  map.put(MAP_QUERY, "");    
  }    map.put(MAP_CONTEXTPATH, 
  request.getContextPath());    
  if ("true".equalsIgnoreCase(param.getParameter(PARAM_PARAMETERS, 
  null))){  Enumeration 
  e = 
  request.getParameterNames();  
  while(e.hasMoreElements()){    
  String name = (String) 
  e.nextElement();    
  String value = request.getParameter(name);getLogger().debug("Encode 
  Parameter: " + name + " with value: " + 
  value);    
  if (value != null && 
  !map.containsKey(name)){  
  map.put(name, URLEncoder.encode( value 
  ));    
  }  }  
  String[] paramNames = 
  param.getNames();  
  for (int i=0; i< paramNames.length; i++) 
  {  if 
  (paramNames[i].startsWith(PARAM_DEFAULT_PREFIX) &&  
  (request.getParameter(paramNames[i].substring(PARAM_DEFAULT_PREFIX.length())) 
  == null)) {getLogger().debug("Encode Parameter: " + paramNames[i] + " with 
  value: " + param.getParameter(paramNames[i]));  
  map.put(paramNames[i].substring(P

AW: Umlauts in cocoon 2.0.2

2002-11-10 Thread Sternath Elmar
Hi Braun,

I wrote an action to encode the request params before accessing them in the sitemap:

public class RequestEncodedParamAction extends ComposerAction implements ThreadSafe {

public final static String MAP_URI = "requestURI";
public final static String MAP_QUERY   = "requestQuery";
public final static String MAP_CONTEXTPATH = "context";

public final static String PARAM_PARAMETERS = "parameters";
public final static String PARAM_DEFAULT_PREFIX = "default.";


public Map act( Redirector redirector, SourceResolver resolver, Map objectModel, 
String source, Parameters param )
throws Exception
{

Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
if (request == null) {
  getLogger().error("RequestInfoAction: no request object!");
  return(null);
}

Map map = new HashMap();

map.put(MAP_URI, request.getRequestURI());

String query = request.getQueryString();
if (query != null && query.length() > 0){
  map.put(MAP_QUERY, "?" + query);
}
else{
  map.put(MAP_QUERY, "");
}

map.put(MAP_CONTEXTPATH, request.getContextPath());

if ("true".equalsIgnoreCase(param.getParameter(PARAM_PARAMETERS, null))){
  Enumeration e = request.getParameterNames();
  while(e.hasMoreElements()){
String name = (String) e.nextElement();
String value = request.getParameter(name);

getLogger().debug("Encode Parameter: " + name + " with value: 
" + value);
if (value != null && !map.containsKey(name)){
  map.put(name, URLEncoder.encode( value ));
}
  }

  String[] paramNames = param.getNames();
  for (int i=0; i< paramNames.length; i++) {
  if (paramNames[i].startsWith(PARAM_DEFAULT_PREFIX) &&
  
(request.getParameter(paramNames[i].substring(PARAM_DEFAULT_PREFIX.length())) == 
null)) {
getLogger().debug("Encode Parameter: " + paramNames[i] + " 
with value: " + param.getParameter(paramNames[i]));

map.put(paramNames[i].substring(PARAM_DEFAULT_PREFIX.length()), URLEncoder.encode( 
param.getParameter(paramNames[i])));
  }
  }


}

return(map);
}
}

-----Ursprüngliche Nachricht-
Von: Braun [mailto:jakarta@;kbr-immobilien.de]
Gesendet: Sonntag, 10. November 2002 02:32
An: [EMAIL PROTECTED]
Betreff: Umlauts in cocoon 2.0.2


I have the problem with german Umlauts in request parameters.
When I transfer german Umlauts by request paramaters cocoon doesn't 
decode the Umlauts encoding when I use these Umlauts in my xml-documents 
or stylesheets.
I set already all my encodings to ISO-8859-1.




-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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

-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Umlauts in cocoon 2.0.2

2002-11-09 Thread Antonio A. Gallardo Rivera
I recommmend you to check the mail archives fo this list with the keyword
"Umlauts". There is a summary about this problem.

Antonio Gallardo

Braun dijo:
> I have the problem with german Umlauts in request parameters.
> When I transfer german Umlauts by request paramaters cocoon doesn't
> decode the Umlauts encoding when I use these Umlauts in my xml-documents
>  or stylesheets.
> I set already all my encodings to ISO-8859-1.
>
>
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Umlauts in cocoon 2.0.2

2002-11-09 Thread Braun
I have the problem with german Umlauts in request parameters.
When I transfer german Umlauts by request paramaters cocoon doesn't 
decode the Umlauts encoding when I use these Umlauts in my xml-documents 
or stylesheets.
I set already all my encodings to ISO-8859-1.




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Re: Umlauts in cocoon 2.0.2

2002-09-19 Thread Kenneth Roper

Thanks to everyone who replied to this thread, I managed to crack it in
the end.

The solution to my umlaut problem consisted of:

1. Putting this action at the top of the pipeline which handles the
UTF-8 post:

   


2. Saving all my files ensuring the bytes written to disk were UTF-8 (as
Ugo, Antonio and Joerg told me).  Specifically, my sitemap, web.xml, all
xsl files, and any static xml files I read in my pipelines.

3. Putting an encoding child in my serializers, e.g.

  ...
  UTF-8 


Step 3 may be optional, but I know the container-encoding of cocoon
defaults to ISO-8859-1 so I thought it best left in.

I am sure that step 1 can be replaced by setting the form-encoding
parameter in the cocoon init-params, but doing this has knock on effects
I hinted at in an earlier post, as I think there is a bug in the cocoon
code (2.0.2, anyway).  Fortunately, for the moment I can avoid this.

Thanks for everyone's help!

Kenneth


On Wed, 2002-09-18 at 15:41, Kenneth Roper wrote:
> Firstly, thanks for everyone's suggestions, this is a very helpful list!
> 
> Unfortunately, I am no further forward.
> 
> Changing the encoding of the sitemap.xmap and the web.xml file has no
> effect.
> 
> Changing the encoding of the xhtml serializer looked like I was on the
> right track, but unfortunately doesn't work:
> 
> I have a this string in my db: 
> 
> "ÄäÖöÜüß"
> 
> It is displayed on an html page generated by a cocoon pipeline.
> 
> If I change my serializer definition in my sitemap and add this:
>  ISO-8859-1
> The above string appears in my browser (and in the page source) as 7
> question marks, i.e. "???"
> 
> If I change the encoding back to this:
>  UTF-8
> I can then see my original string correctly. However, if I post this
> string back to my application, my application receives the string as
> first detailed in the original post (i.e. "ÄäÖöÜüß").
> 
> There is obviously a difference in encoding (or something) between text
> coming from the server to the browser, and the text posted from the
> browser back to the server.
> 
> Any more ideas?
> 
> Thanks again.
> Kenneth
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Joerg Heinicke

Does Ugo's suggestion work? Your strange string looks like a valid UTF-8 
encoded string.

Regards,

Joerg

Kenneth Roper wrote:
> Firstly, thanks for everyone's suggestions, this is a very helpful list!
> 
> Unfortunately, I am no further forward.
> 
> Changing the encoding of the sitemap.xmap and the web.xml file has no
> effect.
> 
> Changing the encoding of the xhtml serializer looked like I was on the
> right track, but unfortunately doesn't work:
> 
> I have a this string in my db: 
> 
> "ÄäÖöÜüß"
> 
> It is displayed on an html page generated by a cocoon pipeline.
> 
> If I change my serializer definition in my sitemap and add this:
>  ISO-8859-1
> The above string appears in my browser (and in the page source) as 7
> question marks, i.e. "???"
> 
> If I change the encoding back to this:
>  UTF-8
> I can then see my original string correctly. However, if I post this
> string back to my application, my application receives the string as
> first detailed in the original post (i.e. "Ã"äÃ-öÃoeüÃY"").
> 
> There is obviously a difference in encoding (or something) between text
> coming from the server to the browser, and the text posted from the
> browser back to the server.
> 
> Any more ideas?
> 
> Thanks again.
> Kenneth


-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Kenneth Roper

Antonio

Sorry if I came across a bit harsh, I just meant to emphasise the
point.  A db conflict was my first instinct, too, so I spent a fair bit
of time investigating that and have ruled it out.  I guess after
spending a day and a half messing around with text-encoding my nerves
are shot!

Anyway, I haven't investigated the format the files are stored in, yet. 
Which files in particular do you suspect?  All my xml is generated
dynamically, it's just the xsls which are persisted in files.  Surely
only the last transformer which is run should determine the character
encoding posted by the browser?

I've been reading the cocoon code, and have been experimenting with
setting the form-encoding and container-encoding startup attributes, but
I'm having to struggle through null pointer exceptions being thrown in
the cocoon decode() method.

Original exception : java.lang.NullPointerException
at
org.apache.cocoon.environment.http.HttpRequest.decode(HttpRequest.java:300)
at
org.apache.cocoon.environment.http.HttpRequest.getParameter(HttpRequest.java:293)
at
org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:150)
at
org.apache.cocoon.matching.RequestParameterMatcher.match(RequestParameterMatcher.java:91)

I think this is because one of the pipelines I use has an optional
parameter, and when the parameter isn't there the null parameter is
still attempted to be decoded ...

Anyway, my platform is RedHat 7.2, jdk 1.3.1_04,
JBoss-2.4.7_Jetty-4.0.4, and of course Cocoon 2.0.2.

Please keep those suggestions coming, just in case I don't knock myself
out with the repeated banging of my head against a wall ...

Thanks
Kenneth

On Wed, 2002-09-18 at 16:15, Antonio Gallardo Rivera wrote:
> Take it easy, baby! We are trying to help not to fight ;)
> 
> Do you read my post about how is the file really stored in the hard disk? Are 
> you sure that your XML, XSP, XSL files are stored in your required format?
> 
> I told you that because when I started with Cocoon. I had the same problem.
> 
> What plataform are you using?
> 
> Antonio Gallardo.
> 
> 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Antonio Gallardo Rivera

Take it easy, baby! We are trying to help not to fight ;)

Do you read my post about how is the file really stored in the hard disk? Are 
you sure that your XML, XSP, XSL files are stored in your required format?

I told you that because when I started with Cocoon. I had the same problem.

What plataform are you using?

Antonio Gallardo.



El Miércoles, 18 de Septiembre de 2002 09:08, Kenneth Roper escribió:
> I GUARANTEE it is not the DB.  If it was the DB it wouldn't display
> correctly the first time.  Also, I have determined that the string is
> mangled when it is retrieved from the HTTPRequest, long before it is
> inserted into the DB.  Manually inserting the string into the DB over
> the same DB drivers works fine.
>
> This is purely a servlet / cocoon issue.
>
> On Wed, 2002-09-18 at 15:50, Antonio Gallardo Rivera wrote:
> > Please tell us what database are you using? And what encoding the
> > database is?
> >
> > This looks like a conflict between the database encoding and the
> > application.
> >
> > Antonio Gallardo.
> >
> > El Miércoles, 18 de Septiembre de 2002 08:41, Kenneth Roper escribió:
> > > Firstly, thanks for everyone's suggestions, this is a very helpful
> > > list!
> > >
> > > Unfortunately, I am no further forward.
> > >
> > > Changing the encoding of the sitemap.xmap and the web.xml file has no
> > > effect.
> > >
> > > Changing the encoding of the xhtml serializer looked like I was on the
> > > right track, but unfortunately doesn't work:
> > >
> > > I have a this string in my db:
> > >
> > > "ÄäÖöÜüß"
> > >
> > > It is displayed on an html page generated by a cocoon pipeline.
> > >
> > > If I change my serializer definition in my sitemap and add this:
> > >  ISO-8859-1
> > > The above string appears in my browser (and in the page source) as 7
> > > question marks, i.e. "???"
> > >
> > > If I change the encoding back to this:
> > >  UTF-8
> > > I can then see my original string correctly. However, if I post this
> > > string back to my application, my application receives the string as
> > > first detailed in the original post (i.e. "ÄäÖöÜüß").
> > >
> > > There is obviously a difference in encoding (or something) between text
> > > coming from the server to the browser, and the text posted from the
> > > browser back to the server.
> > >
> > > Any more ideas?
> > >
> > > Thanks again.
> > > Kenneth
> > >
> > >
> > > -
> > > Please check that your question  has not already been answered in the
> > > FAQ before posting. 
> > >
> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > > For additional commands, e-mail:   <[EMAIL PROTECTED]>
> >
> > -
> > Please check that your question  has not already been answered in the
> > FAQ before posting. 
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Kenneth Roper

I GUARANTEE it is not the DB.  If it was the DB it wouldn't display
correctly the first time.  Also, I have determined that the string is
mangled when it is retrieved from the HTTPRequest, long before it is
inserted into the DB.  Manually inserting the string into the DB over
the same DB drivers works fine.

This is purely a servlet / cocoon issue.


On Wed, 2002-09-18 at 15:50, Antonio Gallardo Rivera wrote:
> Please tell us what database are you using? And what encoding the database is?
> 
> This looks like a conflict between the database encoding and the application.
> 
> Antonio Gallardo.
> 
> El Miércoles, 18 de Septiembre de 2002 08:41, Kenneth Roper escribió:
> > Firstly, thanks for everyone's suggestions, this is a very helpful list!
> >
> > Unfortunately, I am no further forward.
> >
> > Changing the encoding of the sitemap.xmap and the web.xml file has no
> > effect.
> >
> > Changing the encoding of the xhtml serializer looked like I was on the
> > right track, but unfortunately doesn't work:
> >
> > I have a this string in my db:
> >
> > "ÄäÖöÜüß"
> >
> > It is displayed on an html page generated by a cocoon pipeline.
> >
> > If I change my serializer definition in my sitemap and add this:
> >  ISO-8859-1
> > The above string appears in my browser (and in the page source) as 7
> > question marks, i.e. "???"
> >
> > If I change the encoding back to this:
> >  UTF-8
> > I can then see my original string correctly. However, if I post this
> > string back to my application, my application receives the string as
> > first detailed in the original post (i.e. "ÄäÖöÜüß").
> >
> > There is obviously a difference in encoding (or something) between text
> > coming from the server to the browser, and the text posted from the
> > browser back to the server.
> >
> > Any more ideas?
> >
> > Thanks again.
> > Kenneth
> >
> >
> > -
> > Please check that your question  has not already been answered in the
> > FAQ before posting. 
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Ugo Cei

Kenneth Roper wrote:
> Firstly, thanks for everyone's suggestions, this is a very helpful list!
> 
> Unfortunately, I am no further forward.
> 
> Changing the encoding of the sitemap.xmap and the web.xml file has no
> effect.
> 
> Changing the encoding of the xhtml serializer looked like I was on the
> right track, but unfortunately doesn't work:
> 
> I have a this string in my db: 
> 
> "ÄäÖöÜüß"
> 
> It is displayed on an html page generated by a cocoon pipeline.
> 
> If I change my serializer definition in my sitemap and add this:
>  ISO-8859-1
> The above string appears in my browser (and in the page source) as 7
> question marks, i.e. "???"
> 
> If I change the encoding back to this:
>  UTF-8
> I can then see my original string correctly. However, if I post this
> string back to my application, my application receives the string as
> first detailed in the original post (i.e. "ÄäÖöÜüß").
> 
> There is obviously a difference in encoding (or something) between text
> coming from the server to the browser, and the text posted from the
> browser back to the server.
> 
> Any more ideas?

So it looks like the string is in UTF-8. In this case, you should make 
sure everything is working in UTF-8. Use request.setEncoding("UTF-8") in 
your action/generator/XSP, delete any encoding attribute from the XML 
prolog in XML files (UTF-8 is the default) and see if it makes any 
difference.

I have no other ideas, but to confirm you that i18n is a PITA ;-)

Ugo


-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Antonio Gallardo Rivera

Please tell us what database are you using? And what encoding the database is?

This looks like a conflict between the database encoding and the application.

Antonio Gallardo.

El Miércoles, 18 de Septiembre de 2002 08:41, Kenneth Roper escribió:
> Firstly, thanks for everyone's suggestions, this is a very helpful list!
>
> Unfortunately, I am no further forward.
>
> Changing the encoding of the sitemap.xmap and the web.xml file has no
> effect.
>
> Changing the encoding of the xhtml serializer looked like I was on the
> right track, but unfortunately doesn't work:
>
> I have a this string in my db:
>
> "ÄäÖöÜüß"
>
> It is displayed on an html page generated by a cocoon pipeline.
>
> If I change my serializer definition in my sitemap and add this:
>  ISO-8859-1
> The above string appears in my browser (and in the page source) as 7
> question marks, i.e. "???"
>
> If I change the encoding back to this:
>  UTF-8
> I can then see my original string correctly. However, if I post this
> string back to my application, my application receives the string as
> first detailed in the original post (i.e. "ÄäÖöÜüß").
>
> There is obviously a difference in encoding (or something) between text
> coming from the server to the browser, and the text posted from the
> browser back to the server.
>
> Any more ideas?
>
> Thanks again.
> Kenneth
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Kenneth Roper

Firstly, thanks for everyone's suggestions, this is a very helpful list!

Unfortunately, I am no further forward.

Changing the encoding of the sitemap.xmap and the web.xml file has no
effect.

Changing the encoding of the xhtml serializer looked like I was on the
right track, but unfortunately doesn't work:

I have a this string in my db: 

"ÄäÖöÜüß"

It is displayed on an html page generated by a cocoon pipeline.

If I change my serializer definition in my sitemap and add this:
 ISO-8859-1
The above string appears in my browser (and in the page source) as 7
question marks, i.e. "???"

If I change the encoding back to this:
 UTF-8
I can then see my original string correctly. However, if I post this
string back to my application, my application receives the string as
first detailed in the original post (i.e. "ÄäÖöÜüß").

There is obviously a difference in encoding (or something) between text
coming from the server to the browser, and the text posted from the
browser back to the server.

Any more ideas?

Thanks again.
Kenneth


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Antonio Gallardo Rivera

It happens ;) I just needed to read it 2 times (or more! hehe) to understand 
the construction. Anyway, the concept was delivered. And we understanded it.

Thanks for the help.

Antonio Gallardo.

El Miércoles, 18 de Septiembre de 2002 08:00, Joerg Heinicke escribió:
> > You must not have encoding="ISO-8859-1", ...
>
> Sorry, it's a common mistake of Germans in English language I think:
>
> "must not have" should be "don't need".
>
> Regards,
>
> Joerg

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Joerg Heinicke

> You must not have encoding="ISO-8859-1", ...

Sorry, it's a common mistake of Germans in English language I think:

"must not have" should be "don't need".

Regards,

Joerg


-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Ugo Cei

Jens Lorenz wrote:
> Setting the encoding of the generated HTML pages does not help. The URL
> send back by the Browser is always UTF-8 encoded.
> 
> Request.setCharacterEncoding(), as suggested by Vadim, usually helps for
> GET-Parameters.
> 
> Generally it's a good idea to avoid "unsafe" (see RFC) characters in URLs
> and GET-Parameters.

There is no mention of URLs in the original problem description:

 >> Any string with an umlaut was being mangled between posting from the
 >> browser, and appearing in my variable in an action when I used the
 >> command:
 >>
 >> String mangled= myCocoonRequest.getParameter(name);

I assumed that the strings where POSTed from a form. Setting the 
encoding of the HTML page containing the form helped me in a similar 
situation.

Ugo


-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Antonio Gallardo Rivera

I guess with you.

We dont only need to write:



or



and resolve our problems.


One very important step is ASSURE that the file is saved in the type we asked. 
"UTF-8" or "ISO-8859-1".

To do this we need a editor that can write the file in the required code.

My preference is jEdit (http://www.jedit.org/) because it let me choose the 
"real" code in what it will save my file.

I hope it can help too. ;)

Antonio Gallardo.


El Miércoles, 18 de Septiembre de 2002 07:35, Joerg Heinicke escribió:
> Antonio Gallardo Rivera wrote:
> > First, Are you using some database?
> >
> > Some old tips (from my friend Barbara):
> >
> > 1-Ensure that every XML is starting with:
> >
> > 
>
> I think the hint 1 is given to often. You must not have
> encoding="ISO-8859-1", but the encoding of the file must be the same
> written on the top of the file. So it's of course possible to have umlauts
> with UTF-8, you only need an editor to write them correctly. If the parser
> does not complain, everything *can* be alright. I think ö was a critical
> character to test UTF-8 functionality.
>
> Regards,
>
> Joerg

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Joerg Heinicke

Antonio Gallardo Rivera wrote:
> First, Are you using some database?
> 
> Some old tips (from my friend Barbara):
> 
> 1-Ensure that every XML is starting with:
> 
> 
> 

I think the hint 1 is given to often. You must not have 
encoding="ISO-8859-1", but the encoding of the file must be the same written 
on the top of the file. So it's of course possible to have umlauts with 
UTF-8, you only need an editor to write them correctly. If the parser does 
not complain, everything *can* be alright. I think ö was a critical 
character to test UTF-8 functionality.

Regards,

Joerg


-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Jens Lorenz

- Original Message -
From: "Ugo Cei" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 2:43 PM
Subject: Re: Umlauts in cocoon 2.0.2


>
> Change the encoding of your HTML pages by setting the encoding property
> on the serializer:
>
>   mime-type="text/html" name="html" pool-grow="4" pool-max="32"
> pool-min="4" src="org.apache.cocoon.serialization.HTMLSerializer">
>1024
>iso-8859-1
>  
>
> The browser should recognize the encoding and send back data in
> ISO-8859-1. I don't know if what I've just written is entirely correct,
> but it sure saved my day when faced with a similar situation.

Setting the encoding of the generated HTML pages does not help. The URL
send back by the Browser is always UTF-8 encoded.

Request.setCharacterEncoding(), as suggested by Vadim, usually helps for
GET-Parameters.

Generally it's a good idea to avoid "unsafe" (see RFC) characters in URLs
and GET-Parameters.

> Ugo
>

Jens


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Ugo Cei

Kenneth Roper wrote:
> Hi
> 
> I'm trying to set up my cocoon application to handle strings with
> Umlauts in (e.g. "ÄäÖöÜüß").  I'm using Cocoon 2.0.2.
> 
> Any string with an umlaut was being mangled between posting from the
> browser, and appearing in my variable in an action when I used the
> command:
> 
> String mangled= myCocoonRequest.getParameter(name);
> 
> The string I get from mangled is: "ÄäÖöÜüß", whereas it should
> be: "ÄäÖöÜüß".
> 
> I've left all of cocoon's character encoding settings on the defaults. 
> Does anyone know what I'm doing wrong?
> 
> Thanks.
> Kenneth

Change the encoding of your HTML pages by setting the encoding property 
on the serializer:

 
   1024
   iso-8859-1
 

The browser should recognize the encoding and send back data in 
ISO-8859-1. I don't know if what I've just written is entirely correct, 
but it sure saved my day when faced with a similar situation.

Ugo


-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Vadim Gritsenko

Antonio Gallardo Rivera wrote:

>First, Are you using some database?
>
>Some old tips (from my friend Barbara):
>
>1-Ensure that every XML is starting with:
>
>
>
>
>2-In the site map check for your serializer:
>
>name="html" pool-grow="4" pool-max="32" pool-min="4" 
>src="org.apache.cocoon.serialization.HTMLSerializer">
>  -//W3C//DTD HTML 4.01//ES
>  http://www.w3.org/TR/html4/strict.dtd
>  1024
>  ISO-8859-1  
>
>
>(Please, see the encoding tag above)
>
>
>
>3-If you are using xml serializer you can do that too:
>
>name="xhtml" pool-grow="2" pool-max="64" pool-min="2" 
>src="org.apache.cocoon.serialization.XMLSerializer">
> -//W3C//DTD XHTML 1.0 Strict//EN
> 
>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
> ISO-8859-1
>   
>
>(Please, see the encoding tag above)
>
>4- If you are using some database check that it is working with the code you 
>need, for example in PostgreSQL i created the databse using:
>
>createdb -E LATIN1 -e my_database_name
>  
>

5- Set encoding for the request: request.setCharacterEncoding() *before* 
your first call to request.getParameter (this is better done as the very 
first action in the sitemap)

Vadim



>I hope it will helps you.
>
>Regards,
>
>Antonio Gallardo
>
>El Miércoles, 18 de Septiembre de 2002 04:13, Kenneth Roper escribió:
>  
>
>>Hi
>>
>>I'm trying to set up my cocoon application to handle strings with
>>Umlauts in (e.g. "ÄäÖöÜüß").  I'm using Cocoon 2.0.2.
>>
>>Any string with an umlaut was being mangled between posting from the
>>browser, and appearing in my variable in an action when I used the
>>command:
>>
>>String mangled= myCocoonRequest.getParameter(name);
>>
>>The string I get from mangled is: "ÄäÖöÜüß", whereas it should
>>be: "ÄäÖöÜüß".
>>
>>I've left all of cocoon's character encoding settings on the defaults.
>>Does anyone know what I'm doing wrong?
>>
>>Thanks.
>>Kenneth
>>
>>




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Antonio Gallardo Rivera

First, Are you using some database?

Some old tips (from my friend Barbara):

1-Ensure that every XML is starting with:




2-In the site map check for your serializer:


  -//W3C//DTD HTML 4.01//ES
  http://www.w3.org/TR/html4/strict.dtd
  1024
  ISO-8859-1  


(Please, see the encoding tag above)



3-If you are using xml serializer you can do that too:


 -//W3C//DTD XHTML 1.0 Strict//EN
 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
 ISO-8859-1
   

(Please, see the encoding tag above)

4- If you are using some database check that it is working with the code you 
need, for example in PostgreSQL i created the databse using:

createdb -E LATIN1 -e my_database_name

I hope it will helps you.

Regards,

Antonio Gallardo

El Miércoles, 18 de Septiembre de 2002 04:13, Kenneth Roper escribió:
> Hi
>
> I'm trying to set up my cocoon application to handle strings with
> Umlauts in (e.g. "ÄäÖöÜüß").  I'm using Cocoon 2.0.2.
>
> Any string with an umlaut was being mangled between posting from the
> browser, and appearing in my variable in an action when I used the
> command:
>
> String mangled= myCocoonRequest.getParameter(name);
>
> The string I get from mangled is: "ÄäÖöÜüß", whereas it should
> be: "ÄäÖöÜüß".
>
> I've left all of cocoon's character encoding settings on the defaults.
> Does anyone know what I'm doing wrong?
>
> Thanks.
> Kenneth
>
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Sanne de Roever

You should also take care of the url encoding properly.
There was a bug that in xsp get parameters where not automatically url
decoded:
put on your java/xsp hat!

- Original Message -
From: "Barbara Post" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 12:17 PM
Subject: Re: Umlauts in cocoon 2.0.2


> Is it possible to set "Action encoding" somewhere ? You can set
serializers
> encoding by adding iso-8859-1. But for Actions I don't
> know. OK, change the sitemap's encoding from utf-8 to iso-8859-1 too and
try
> again, this may help. This encoding fits your characters. When you post,
> which encoding is in the html source ? If it is utf-8, changing the
> serializers' encoding will solve it. So happy encoding... I stumbled on
this
> too. It seems not to be clear enough in the docs...?
>
> Babs
> - Original Message -
> From: "Kenneth Roper" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 18, 2002 12:13 PM
> Subject: Umlauts in cocoon 2.0.2
>
>
> Hi
>
> I'm trying to set up my cocoon application to handle strings with
> Umlauts in (e.g. "ÄäÖöÜüß").  I'm using Cocoon 2.0.2.
>
> Any string with an umlaut was being mangled between posting from the
> browser, and appearing in my variable in an action when I used the
> command:
>
> String mangled= myCocoonRequest.getParameter(name);
>
> The string I get from mangled is: "ÄäÖöÜüß", whereas it should
> be: "ÄäÖöÜüß".
>
> I've left all of cocoon's character encoding settings on the defaults.
> Does anyone know what I'm doing wrong?
>
> Thanks.
> Kenneth
>
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Umlauts in cocoon 2.0.2

2002-09-18 Thread Barbara Post

Is it possible to set "Action encoding" somewhere ? You can set serializers
encoding by adding iso-8859-1. But for Actions I don't
know. OK, change the sitemap's encoding from utf-8 to iso-8859-1 too and try
again, this may help. This encoding fits your characters. When you post,
which encoding is in the html source ? If it is utf-8, changing the
serializers' encoding will solve it. So happy encoding... I stumbled on this
too. It seems not to be clear enough in the docs...?

Babs
- Original Message -
From: "Kenneth Roper" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 12:13 PM
Subject: Umlauts in cocoon 2.0.2


Hi

I'm trying to set up my cocoon application to handle strings with
Umlauts in (e.g. "ÄäÖöÜüß").  I'm using Cocoon 2.0.2.

Any string with an umlaut was being mangled between posting from the
browser, and appearing in my variable in an action when I used the
command:

String mangled= myCocoonRequest.getParameter(name);

The string I get from mangled is: "ÄäÖöÜüß", whereas it should
be: "ÄäÖöÜüß".

I've left all of cocoon's character encoding settings on the defaults.
Does anyone know what I'm doing wrong?

Thanks.
Kenneth



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Umlauts in cocoon 2.0.2

2002-09-18 Thread Kenneth Roper

Hi

I'm trying to set up my cocoon application to handle strings with
Umlauts in (e.g. "ÄäÖöÜüß").  I'm using Cocoon 2.0.2.

Any string with an umlaut was being mangled between posting from the
browser, and appearing in my variable in an action when I used the
command:

String mangled= myCocoonRequest.getParameter(name);

The string I get from mangled is: "ÄäÖöÜüß", whereas it should
be: "ÄäÖöÜüß".

I've left all of cocoon's character encoding settings on the defaults. 
Does anyone know what I'm doing wrong?

Thanks.
Kenneth



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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