Hello Thomas,

I tried to apply your patch but the build failed because of this:
foundContent = new String(b, "UTF-8");
My system didn't like it (the UTF-8 part).
Converting my file to UTF-8 didn't help as well but actually I tried it earlier
with notepad. Now I tried with iconv command under linux but no difference. So
probably you are right my system doesn't use UTF-8 by default.
But I don't know where to change this behavior.

But when I removed all "UTF-8" entries from
/swamp/src/de/suse/swamp/core/notification/Notification.java
and /swamp/src/de/suse/swamp/core/notification/NotificationTools.java
files and modified the 72nd line of NotificationTools.java from
props.put("mail.mime.charset", "UTF-8"); to props.put("mail.mime.charset",
"ISO-8859-1"); and recompiled/reinstalled swamp the characters in the subject
and message body started to be displayed correctly.


Many thanks for your help.

Regards, Gyorgy

Idézés Gyorgy Knyihar <[EMAIL PROTECTED]>:

> Hello Thomas,
>
> What kind of tool do you use to encode files to utf-8?
>
> Thanks, Gyorgy
>
> Idézés Thomas Schmidt <[EMAIL PROTECTED]>:
>
> > Gyorgy Knyihar wrote:
> > > Hello Thomas,
> > >
> > > Please find attached the notification template.
> > > It is in ISO-8859-1.
> > > I tried to encode it to UTF-8 with notepad in windows but then it got
> even
> > > worse. After encoding to UTF-8 the message body was incorrect as well.
> > > My workflow.xml is in ISO-8859-1 as well.
> >
> > Hi, I converted your template to UTF-8, and it was working here.
> > Maybe the problem is, that your system encoding is not UTF-8.
> > I changed the code to always read the files as UTF-8 never mind the
> > systems encoding. Also the mail subject was not explicitely set to UTF-8
> > which could explain the difference between your message subject and body.
> > Greetings
> >
> >
> > --- swamp/src/de/suse/swamp/core/notification/NotificationTools.java
> > (Revision 7203)
> > +++ swamp/src/de/suse/swamp/core/notification/NotificationTools.java
> > (Arbeitskopie)
> > @@ -85,7 +85,7 @@
> >                  msg.addRecipient(Message.RecipientType.TO, toadd[0]);
> >              }
> >              // -- Set the subject and body text --
> > -            msg.setSubject(subject);
> > +            msg.setSubject(subject, "UTF-8");
> >              msg.setText(body, "UTF-8");
> >
> >              // No CC Feature at the Moment
> >
> >
> >
> > --- swamp/src/de/suse/swamp/core/notification/Notification.java
> > (Revision 7203)
> > +++ swamp/src/de/suse/swamp/core/notification/Notification.java
> > (Arbeitskopie)
> > @@ -285,7 +285,7 @@
> >                                         Logger.ERROR("Template File <" +
> > file + "> not found !!");
> >                      throw e;
> >                                 }
> > -                               foundContent = new String(b);
> > +                               foundContent = new String(b, "UTF-8");
> >                         } else {
> >                                 Logger.ERROR("You have to set either a
> > Template File, or A Template String");
> >                         }
> >
> > --
> > Thomas Schmidt (tschmidt [at] suse.de)
> > SUSE Linux Products GmbH :: Research & Development :: Internal Tools
> > "Wer die Vergangenheit kontrolliert, kontrolliert die Zukunft.
> > Wer die Gegenwart kontrolliert, kontrolliert die Vergangenheit.", 1984
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> > that extends applications into web and mobile media. Attend the live
> webcast
> > and join the prime developer group breaking into this new coding territory!
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> > _______________________________________________
> > swamp-devel mailing list
> > swamp-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/swamp-devel
> > http://swamp.sf.net
> >
> >
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
> _______________________________________________
> swamp-devel mailing list
> swamp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/swamp-devel
> http://swamp.sf.net
>
>





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
swamp-devel mailing list
swamp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swamp-devel
http://swamp.sf.net

Reply via email to