Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » encoding problem in Tomcat
encoding problem in Tomcat [message #38943] Tue, 17 July 2007 12:52 Go to next message
Thomas Kühne is currently offline Thomas KühneFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

I have a small problem with my RAP Application deploying in a Tomcat
servlet container. The application works fine with Eclipse in the Jetty
container under Win XP. But when I deploy the application to a Linux
Box with Tomcat 5.5 the german umlauts which are coded in the Application
i.e. a Text of a Tab are not displayed correctly.

Any hints would be appreciated.

Regards,
Tom
Re: encoding problem in Tomcat [message #38965 is a reply to message #38943] Tue, 17 July 2007 13:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Tom,

does one of these hits solve your problem?
http://www.eclipse.org/search/search.cgi?q=encoding&cmd= Search%21&form=extended&wf=574a74&ps=10&m=al l&t=5&ul=%2Fnewslists%2Fnews.eclipse.technology.rap& amp;wm=wrd&t=News&t=Mail

Cheers,
Rüdiger

RAP wrote:
> Hi,
>
> I have a small problem with my RAP Application deploying in a Tomcat
> servlet container. The application works fine with Eclipse in the Jetty
> container under Win XP. But when I deploy the application to a Linux
> Box with Tomcat 5.5 the german umlauts which are coded in the Application
> i.e. a Text of a Tab are not displayed correctly.
>
> Any hints would be appreciated.
>
> Regards,
> Tom
>
>
Re: encoding problem in Tomcat [message #39204 is a reply to message #38965] Tue, 17 July 2007 16:30 Go to previous messageGo to next message
Thomas Kühne is currently offline Thomas KühneFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

hmm, I read the forum entry's but they don't solve my problem. I added
URIEncoding="UTF-8" to my connector
setting for port 8080 and AJP. It ist strange that strings which I request
via a SOAP Request from another server
are correctly displayed (they are UTF-8 encoded). But strings which came out
of the java code or a properties file
are not encoded correctly.

Bug 187895 says :

"If I compile in Windows with cp1232 or in MacOS with MacRoman then all
works
fine and all my problems are out."

What does this mean compile with cp1232? As i know cp1232 is a kind of
character encoding.
Sorry, I never heard this before.

Regards,
Tom

"R
Re: encoding problem in Tomcat [message #39694 is a reply to message #39204] Thu, 19 July 2007 11:05 Go to previous messageGo to next message
Thomas Kühne is currently offline Thomas KühneFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

I am sorry, but I can't work out my problem. Does anybody got another hint
for
my encoding Problem?

Regars,
Thomas

"RAP" <tom@code.de> schrieb im Newsbeitrag
news:f7iqsk$a0r$1@build.eclipse.org...
> Hi,
>
> hmm, I read the forum entry's but they don't solve my problem. I added
> URIEncoding="UTF-8" to my connector
> setting for port 8080 and AJP. It ist strange that strings which I request
> via a SOAP Request from another server
> are correctly displayed (they are UTF-8 encoded). But strings which came
> out of the java code or a properties file
> are not encoded correctly.
>
> Bug 187895 says :
>
> "If I compile in Windows with cp1232 or in MacOS with MacRoman then all
> works
> fine and all my problems are out."
>
> What does this mean compile with cp1232? As i know cp1232 is a kind of
> character encoding.
> Sorry, I never heard this before.
>
> Regards,
> Tom
>
> "R
Re: encoding problem in Tomcat [message #111612 is a reply to message #39694] Fri, 07 November 2008 15:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benjamin.wolff.web.de

Hello,


sorry for this 'gravedigging' :).

Since i'm also experiencing encoding problems now, there are some questions i'd
like to ask.

the internal standard encoding of RAP is UTF-8, right? looking at the sourcecode
of a RAP app in the browser there is a meta tag that defines UTF-8 as encoding:

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

the problem is, i realised these encoding issues too late and coded my
applications with ISO-8859-1. is there a common way to convert to utf-8 encoding?
just changing the encoding of the workspace results in scrambled german 'umlauts'
like ö, ä, ü... or is there only the search/replace mechanism?

i guess the suggested approach is to switch to utf-8 for all future applications?
how do you handle your encoding issues, what encoding do you use with which
environment (os, servlet container, browser configuration)?

on the other hand, since tomcat uses iso-8859-1 by default, is it possible to
change the RAP encoding for the generated html pages? would it make sense, what
would be the impact?

i'd really like to hear your advices and experience about this issue because it
can be very very annoying and causes lots of trouble atm ://.


Greetings,
-Ben



Thomas Kühne schrieb:
> Hi,
>
> I am sorry, but I can't work out my problem. Does anybody got another hint
> for
> my encoding Problem?
>
> Regars,
> Thomas
>
> "RAP" <tom@code.de> schrieb im Newsbeitrag
> news:f7iqsk$a0r$1@build.eclipse.org...
>> Hi,
>>
>> hmm, I read the forum entry's but they don't solve my problem. I added
>> URIEncoding="UTF-8" to my connector
>> setting for port 8080 and AJP. It ist strange that strings which I request
>> via a SOAP Request from another server
>> are correctly displayed (they are UTF-8 encoded). But strings which came
>> out of the java code or a properties file
>> are not encoded correctly.
>>
>> Bug 187895 says :
>>
>> "If I compile in Windows with cp1232 or in MacOS with MacRoman then all
>> works
>> fine and all my problems are out."
>>
>> What does this mean compile with cp1232? As i know cp1232 is a kind of
>> character encoding.
>> Sorry, I never heard this before.
>>
>> Regards,
>> Tom
>>
>> "Rüdiger Herrmann" <rherrmann@innoopract.com> schrieb im Newsbeitrag
>> news:f7iej5$6qa$1@build.eclipse.org...
>>> Tom,
>>>
>>> does one of these hits solve your problem?
>>> http://www.eclipse.org/search/search.cgi?q=encoding&cmd= Search%21&form=extended&wf=574a74&ps=10&m=al l&t=5&ul=%2Fnewslists%2Fnews.eclipse.technology.rap& amp;wm=wrd&t=News&t=Mail
>>>
>>> Cheers,
>>> Rüdiger
>>>
>>> RAP wrote:
>>>> Hi,
>>>>
>>>> I have a small problem with my RAP Application deploying in a Tomcat
>>>> servlet container. The application works fine with Eclipse in the Jetty
>>>> container under Win XP. But when I deploy the application to a Linux
>>>> Box with Tomcat 5.5 the german umlauts which are coded in the
>>>> Application
>>>> i.e. a Text of a Tab are not displayed correctly.
>>>>
>>>> Any hints would be appreciated.
>>>>
>>>> Regards,
>>>> Tom
>>
>
>
Re: encoding problem in Tomcat [message #111995 is a reply to message #111612] Mon, 10 November 2008 17:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Ben W. wrote:
> Hello,
>
>
> sorry for this 'gravedigging' :).
>
> Since i'm also experiencing encoding problems now, there are some
> questions i'd like to ask.
>
> the internal standard encoding of RAP is UTF-8, right? looking at the
> sourcecode of a RAP app in the browser there is a meta tag that defines
> UTF-8 as encoding:
>
> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
>
> the problem is, i realised these encoding issues too late and coded my
> applications with ISO-8859-1. is there a common way to convert to utf-8
> encoding? just changing the encoding of the workspace results in
> scrambled german 'umlauts' like ö, ä, ü... or is there only the
> search/replace mechanism?
Currently, UTF-8 is used to encode text that is transferred between
client and server.
There is no need to convert your resources.
As long as your text resources are registered with the correct
charset, everything should work. See the JavaDoc of IResource for
example.

>
> i guess the suggested approach is to switch to utf-8 for all future
> applications? how do you handle your encoding issues, what encoding do
> you use with which environment (os, servlet container, browser
> configuration)?
>
> on the other hand, since tomcat uses iso-8859-1 by default, is it
> possible to change the RAP encoding for the generated html pages? would
> it make sense, what would be the impact?
AFAIK, tomcat does not have its own default encoding. It uses the
default VM encoding.

>
> i'd really like to hear your advices and experience about this issue
> because it can be very very annoying and causes lots of trouble atm ://.
>
>
> Greetings,
> -Ben
>
>
>
> Thomas Kühne schrieb:
>> Hi,
>>
>> I am sorry, but I can't work out my problem. Does anybody got another
>> hint for
>> my encoding Problem?
>>
>> Regars,
>> Thomas
>>
>> "RAP" <tom@code.de> schrieb im Newsbeitrag
>> news:f7iqsk$a0r$1@build.eclipse.org...
>>> Hi,
>>>
>>> hmm, I read the forum entry's but they don't solve my problem. I
>>> added URIEncoding="UTF-8" to my connector
>>> setting for port 8080 and AJP. It ist strange that strings which I
>>> request via a SOAP Request from another server
>>> are correctly displayed (they are UTF-8 encoded). But strings which
>>> came out of the java code or a properties file
>>> are not encoded correctly.
>>>
>>> Bug 187895 says :
>>>
>>> "If I compile in Windows with cp1232 or in MacOS with MacRoman then
>>> all works
>>> fine and all my problems are out."
>>>
>>> What does this mean compile with cp1232? As i know cp1232 is a kind
>>> of character encoding.
>>> Sorry, I never heard this before.
>>>
>>> Regards,
>>> Tom
>>>
>>> "Rüdiger Herrmann" <rherrmann@innoopract.com> schrieb im Newsbeitrag
>>> news:f7iej5$6qa$1@build.eclipse.org...
>>>> Tom,
>>>>
>>>> does one of these hits solve your problem?
>>>> http://www.eclipse.org/search/search.cgi?q=encoding&cmd= Search%21&form=extended&wf=574a74&ps=10&m=al l&t=5&ul=%2Fnewslists%2Fnews.eclipse.technology.rap& amp;wm=wrd&t=News&t=Mail
>>>>
>>>>
>>>> Cheers,
>>>> Rüdiger
>>>>
>>>> RAP wrote:
>>>>> Hi,
>>>>>
>>>>> I have a small problem with my RAP Application deploying in a Tomcat
>>>>> servlet container. The application works fine with Eclipse in the
>>>>> Jetty
>>>>> container under Win XP. But when I deploy the application to a Linux
>>>>> Box with Tomcat 5.5 the german umlauts which are coded in the
>>>>> Application
>>>>> i.e. a Text of a Tab are not displayed correctly.
>>>>>
>>>>> Any hints would be appreciated.
>>>>>
>>>>> Regards,
>>>>> Tom
>>>
>>
>>
Re: encoding problem in Tomcat [message #112146 is a reply to message #111995] Tue, 11 November 2008 14:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benjamin.wolff.web.de

Hello again,


to describe the problem that i had: i used to develop the RAP application with
windows on my desktop pc, then i used my notebook (which is running linux) to do
some "field-deploying" of the RAP app. i converted all my projectfiles from the
cp1251 windows encoding to utf-8 and configured the workspace in eclipse to use
utf-8 encoding on both machines. the result was that all characters were
displayed correctly in the eclipse editors and when running the app inside
eclipse (run as...).
when i used the feature to deploy the rap in linux and put it on the tomcat
server everything was fine, doing the same with windows resulted in garbled
special-chars.

long story short, under linux, the 'compiled' .class files were created using
linux default encoding, so i had utf-8 encoded files 'compiled' with utf-8.
under windows the feature always seemed to use the cp1251 encoding to create the
..class files for deployment. so i had utf-8 files 'compiled' with cp1251, that
couldn't work of course. there was absolutely no setting or compiler flag inside
of eclipse that solved the problem under windows. the solution was rather simple,
nevertheless i found it more or less by accident :). to solve such encoding
issues i simply needed to add -Dfile.encoding=UTF-8 to the eclipse.ini or as a
startparameter to the eclipse link.

now the problem seems to be solved, running the deploy ant script from the
feature on both, linux and windows environments, and putting it on the tomcat
server show the same (correct) results regarding the character-encoding. so i
think this can be made official:
start eclipse with -Dfile.encoding=UTF-8 so solve these encoding problems when
cross-developing on different platforms!!!!

just adjust the workspace encoding or content types in the eclipse preferences
didn't work for me!

if this is a common solution already, sorry, but then it's really rarely
mentioned ;))


HTH,
Ben



Rüdiger Herrmann schrieb:
> Ben W. wrote:
>> Hello,
>>
>>
>> sorry for this 'gravedigging' :).
>>
>> Since i'm also experiencing encoding problems now, there are some
>> questions i'd like to ask.
>>
>> the internal standard encoding of RAP is UTF-8, right? looking at the
>> sourcecode of a RAP app in the browser there is a meta tag that
>> defines UTF-8 as encoding:
>>
>> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
>>
>> the problem is, i realised these encoding issues too late and coded my
>> applications with ISO-8859-1. is there a common way to convert to
>> utf-8 encoding? just changing the encoding of the workspace results in
>> scrambled german 'umlauts' like ö, ä, ü... or is there only the
>> search/replace mechanism?
> Currently, UTF-8 is used to encode text that is transferred between
> client and server.
> There is no need to convert your resources.
> As long as your text resources are registered with the correct charset,
> everything should work. See the JavaDoc of IResource for example.
>
>>
>> i guess the suggested approach is to switch to utf-8 for all future
>> applications? how do you handle your encoding issues, what encoding do
>> you use with which environment (os, servlet container, browser
>> configuration)?
>>
>> on the other hand, since tomcat uses iso-8859-1 by default, is it
>> possible to change the RAP encoding for the generated html pages?
>> would it make sense, what would be the impact?
> AFAIK, tomcat does not have its own default encoding. It uses the
> default VM encoding.
>
>>
>> i'd really like to hear your advices and experience about this issue
>> because it can be very very annoying and causes lots of trouble atm ://.
>>
>>
>> Greetings,
>> -Ben
>>
>>
>>
>> Thomas Kühne schrieb:
>>> Hi,
>>>
>>> I am sorry, but I can't work out my problem. Does anybody got another
>>> hint for
>>> my encoding Problem?
>>>
>>> Regars,
>>> Thomas
>>>
>>> "RAP" <tom@code.de> schrieb im Newsbeitrag
>>> news:f7iqsk$a0r$1@build.eclipse.org...
>>>> Hi,
>>>>
>>>> hmm, I read the forum entry's but they don't solve my problem. I
>>>> added URIEncoding="UTF-8" to my connector
>>>> setting for port 8080 and AJP. It ist strange that strings which I
>>>> request via a SOAP Request from another server
>>>> are correctly displayed (they are UTF-8 encoded). But strings which
>>>> came out of the java code or a properties file
>>>> are not encoded correctly.
>>>>
>>>> Bug 187895 says :
>>>>
>>>> "If I compile in Windows with cp1232 or in MacOS with MacRoman then
>>>> all works
>>>> fine and all my problems are out."
>>>>
>>>> What does this mean compile with cp1232? As i know cp1232 is a kind
>>>> of character encoding.
>>>> Sorry, I never heard this before.
>>>>
>>>> Regards,
>>>> Tom
>>>>
>>>> "Rüdiger Herrmann" <rherrmann@innoopract.com> schrieb im Newsbeitrag
>>>> news:f7iej5$6qa$1@build.eclipse.org...
>>>>> Tom,
>>>>>
>>>>> does one of these hits solve your problem?
>>>>> http://www.eclipse.org/search/search.cgi?q=encoding&cmd= Search%21&form=extended&wf=574a74&ps=10&m=al l&t=5&ul=%2Fnewslists%2Fnews.eclipse.technology.rap& amp;wm=wrd&t=News&t=Mail
>>>>>
>>>>>
>>>>> Cheers,
>>>>> Rüdiger
>>>>>
>>>>> RAP wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I have a small problem with my RAP Application deploying in a Tomcat
>>>>>> servlet container. The application works fine with Eclipse in the
>>>>>> Jetty
>>>>>> container under Win XP. But when I deploy the application to a Linux
>>>>>> Box with Tomcat 5.5 the german umlauts which are coded in the
>>>>>> Application
>>>>>> i.e. a Text of a Tab are not displayed correctly.
>>>>>>
>>>>>> Any hints would be appreciated.
>>>>>>
>>>>>> Regards,
>>>>>> Tom
>>>>
>>>
>>>
Re: encoding problem in Tomcat [message #112264 is a reply to message #112146] Wed, 12 November 2008 13:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Ben,

you are right in that this pitfall should be documented. I think the
WAR deployment tutorial would be the right place.

However, I doubt that your solution is suitable for general use. A
general purpose documentation should rather point out how to tell
the compiler (that is invoked somewhere during PDE build) how the
source files are encoded.

Feel free to file an enhancement request.

Cheers,
Rüdiger

Ben W. wrote:
> Hello again,
>
>
> to describe the problem that i had: i used to develop the RAP
> application with windows on my desktop pc, then i used my notebook
> (which is running linux) to do some "field-deploying" of the RAP app. i
> converted all my projectfiles from the cp1251 windows encoding to utf-8
> and configured the workspace in eclipse to use utf-8 encoding on both
> machines. the result was that all characters were displayed correctly in
> the eclipse editors and when running the app inside eclipse (run as...).
> when i used the feature to deploy the rap in linux and put it on the
> tomcat server everything was fine, doing the same with windows resulted
> in garbled special-chars.
>
> long story short, under linux, the 'compiled' .class files were created
> using linux default encoding, so i had utf-8 encoded files 'compiled'
> with utf-8.
> under windows the feature always seemed to use the cp1251 encoding to
> create the ..class files for deployment. so i had utf-8 files 'compiled'
> with cp1251, that couldn't work of course. there was absolutely no
> setting or compiler flag inside of eclipse that solved the problem under
> windows. the solution was rather simple, nevertheless i found it more or
> less by accident :). to solve such encoding issues i simply needed to
> add -Dfile.encoding=UTF-8 to the eclipse.ini or as a startparameter to
> the eclipse link.
>
> now the problem seems to be solved, running the deploy ant script from
> the feature on both, linux and windows environments, and putting it on
> the tomcat server show the same (correct) results regarding the
> character-encoding. so i think this can be made official:
> start eclipse with -Dfile.encoding=UTF-8 so solve these encoding
> problems when cross-developing on different platforms!!!!
>
> just adjust the workspace encoding or content types in the eclipse
> preferences didn't work for me!
>
> if this is a common solution already, sorry, but then it's really rarely
> mentioned ;))
>
>
> HTH,
> Ben
>
>
>
> Rüdiger Herrmann schrieb:
>> Ben W. wrote:
>>> Hello,
>>>
>>>
>>> sorry for this 'gravedigging' :).
>>>
>>> Since i'm also experiencing encoding problems now, there are some
>>> questions i'd like to ask.
>>>
>>> the internal standard encoding of RAP is UTF-8, right? looking at the
>>> sourcecode of a RAP app in the browser there is a meta tag that
>>> defines UTF-8 as encoding:
>>>
>>> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
>>>
>>> the problem is, i realised these encoding issues too late and coded
>>> my applications with ISO-8859-1. is there a common way to convert to
>>> utf-8 encoding? just changing the encoding of the workspace results
>>> in scrambled german 'umlauts' like ö, ä, ü... or is there only the
>>> search/replace mechanism?
>> Currently, UTF-8 is used to encode text that is transferred between
>> client and server.
>> There is no need to convert your resources.
>> As long as your text resources are registered with the correct
>> charset, everything should work. See the JavaDoc of IResource for
>> example.
>>
>>>
>>> i guess the suggested approach is to switch to utf-8 for all future
>>> applications? how do you handle your encoding issues, what encoding
>>> do you use with which environment (os, servlet container, browser
>>> configuration)?
>>>
>>> on the other hand, since tomcat uses iso-8859-1 by default, is it
>>> possible to change the RAP encoding for the generated html pages?
>>> would it make sense, what would be the impact?
>> AFAIK, tomcat does not have its own default encoding. It uses the
>> default VM encoding.
>>
>>>
>>> i'd really like to hear your advices and experience about this issue
>>> because it can be very very annoying and causes lots of trouble atm ://.
>>>
>>>
>>> Greetings,
>>> -Ben
>>>
>>>
>>>
>>> Thomas Kühne schrieb:
>>>> Hi,
>>>>
>>>> I am sorry, but I can't work out my problem. Does anybody got
>>>> another hint for
>>>> my encoding Problem?
>>>>
>>>> Regars,
>>>> Thomas
>>>>
>>>> "RAP" <tom@code.de> schrieb im Newsbeitrag
>>>> news:f7iqsk$a0r$1@build.eclipse.org...
>>>>> Hi,
>>>>>
>>>>> hmm, I read the forum entry's but they don't solve my problem. I
>>>>> added URIEncoding="UTF-8" to my connector
>>>>> setting for port 8080 and AJP. It ist strange that strings which I
>>>>> request via a SOAP Request from another server
>>>>> are correctly displayed (they are UTF-8 encoded). But strings which
>>>>> came out of the java code or a properties file
>>>>> are not encoded correctly.
>>>>>
>>>>> Bug 187895 says :
>>>>>
>>>>> "If I compile in Windows with cp1232 or in MacOS with MacRoman then
>>>>> all works
>>>>> fine and all my problems are out."
>>>>>
>>>>> What does this mean compile with cp1232? As i know cp1232 is a kind
>>>>> of character encoding.
>>>>> Sorry, I never heard this before.
>>>>>
>>>>> Regards,
>>>>> Tom
>>>>>
>>>>> "Rüdiger Herrmann" <rherrmann@innoopract.com> schrieb im
>>>>> Newsbeitrag news:f7iej5$6qa$1@build.eclipse.org...
>>>>>> Tom,
>>>>>>
>>>>>> does one of these hits solve your problem?
>>>>>> http://www.eclipse.org/search/search.cgi?q=encoding&cmd= Search%21&form=extended&wf=574a74&ps=10&m=al l&t=5&ul=%2Fnewslists%2Fnews.eclipse.technology.rap& amp;wm=wrd&t=News&t=Mail
>>>>>>
>>>>>>
>>>>>> Cheers,
>>>>>> Rüdiger
>>>>>>
>>>>>> RAP wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I have a small problem with my RAP Application deploying in a Tomcat
>>>>>>> servlet container. The application works fine with Eclipse in the
>>>>>>> Jetty
>>>>>>> container under Win XP. But when I deploy the application to a Linux
>>>>>>> Box with Tomcat 5.5 the german umlauts which are coded in the
>>>>>>> Application
>>>>>>> i.e. a Text of a Tab are not displayed correctly.
>>>>>>>
>>>>>>> Any hints would be appreciated.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Tom
>>>>>
>>>>
>>>>
Re: encoding problem in Tomcat [message #112429 is a reply to message #112264] Fri, 14 November 2008 16:08 Go to previous message
Eclipse UserFriend
Originally posted by: benjamin.wolff.web.de

yes, of course, this would be the more appropriate solution. but so far
i couldn't figure out how to pass this parameter to the pde build compiler :).
if someone may figure it out, i'd love to hear it :).

greetings,
-ben


Rüdiger Herrmann schrieb:
> Ben,
>
> you are right in that this pitfall should be documented. I think the
> WAR deployment tutorial would be the right place.
>
> However, I doubt that your solution is suitable for general use. A
> general purpose documentation should rather point out how to tell the
> compiler (that is invoked somewhere during PDE build) how the source
> files are encoded.
>
> Feel free to file an enhancement request.
>
> Cheers,
> Rüdiger
>
> Ben W. wrote:
>> Hello again,
>>
>>
>> to describe the problem that i had: i used to develop the RAP
>> application with windows on my desktop pc, then i used my notebook
>> (which is running linux) to do some "field-deploying" of the RAP app.
>> i converted all my projectfiles from the cp1251 windows encoding to
>> utf-8 and configured the workspace in eclipse to use utf-8 encoding on
>> both machines. the result was that all characters were displayed
>> correctly in the eclipse editors and when running the app inside
>> eclipse (run as...).
>> when i used the feature to deploy the rap in linux and put it on the
>> tomcat server everything was fine, doing the same with windows
>> resulted in garbled special-chars.
>>
>> long story short, under linux, the 'compiled' .class files were
>> created using linux default encoding, so i had utf-8 encoded files
>> 'compiled' with utf-8.
>> under windows the feature always seemed to use the cp1251 encoding to
>> create the ..class files for deployment. so i had utf-8 files
>> 'compiled' with cp1251, that couldn't work of course. there was
>> absolutely no setting or compiler flag inside of eclipse that solved
>> the problem under windows. the solution was rather simple,
>> nevertheless i found it more or less by accident :). to solve such
>> encoding issues i simply needed to add -Dfile.encoding=UTF-8 to the
>> eclipse.ini or as a startparameter to the eclipse link.
>>
>> now the problem seems to be solved, running the deploy ant script from
>> the feature on both, linux and windows environments, and putting it on
>> the tomcat server show the same (correct) results regarding the
>> character-encoding. so i think this can be made official:
>> start eclipse with -Dfile.encoding=UTF-8 so solve these encoding
>> problems when cross-developing on different platforms!!!!
>>
>> just adjust the workspace encoding or content types in the eclipse
>> preferences didn't work for me!
>>
>> if this is a common solution already, sorry, but then it's really
>> rarely mentioned ;))
>>
>>
>> HTH,
>> Ben
>>
>>
>>
>> Rüdiger Herrmann schrieb:
>>> Ben W. wrote:
>>>> Hello,
>>>>
>>>>
>>>> sorry for this 'gravedigging' :).
>>>>
>>>> Since i'm also experiencing encoding problems now, there are some
>>>> questions i'd like to ask.
>>>>
>>>> the internal standard encoding of RAP is UTF-8, right? looking at
>>>> the sourcecode of a RAP app in the browser there is a meta tag that
>>>> defines UTF-8 as encoding:
>>>>
>>>> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
>>>>
>>>> the problem is, i realised these encoding issues too late and coded
>>>> my applications with ISO-8859-1. is there a common way to convert to
>>>> utf-8 encoding? just changing the encoding of the workspace results
>>>> in scrambled german 'umlauts' like ö, ä, ü... or is there only the
>>>> search/replace mechanism?
>>> Currently, UTF-8 is used to encode text that is transferred between
>>> client and server.
>>> There is no need to convert your resources.
>>> As long as your text resources are registered with the correct
>>> charset, everything should work. See the JavaDoc of IResource for
>>> example.
>>>
>>>>
>>>> i guess the suggested approach is to switch to utf-8 for all future
>>>> applications? how do you handle your encoding issues, what encoding
>>>> do you use with which environment (os, servlet container, browser
>>>> configuration)?
>>>>
>>>> on the other hand, since tomcat uses iso-8859-1 by default, is it
>>>> possible to change the RAP encoding for the generated html pages?
>>>> would it make sense, what would be the impact?
>>> AFAIK, tomcat does not have its own default encoding. It uses the
>>> default VM encoding.
>>>
>>>>
>>>> i'd really like to hear your advices and experience about this issue
>>>> because it can be very very annoying and causes lots of trouble atm
>>>> ://.
>>>>
>>>>
>>>> Greetings,
>>>> -Ben
>>>>
>>>>
>>>>
>>>> Thomas Kühne schrieb:
>>>>> Hi,
>>>>>
>>>>> I am sorry, but I can't work out my problem. Does anybody got
>>>>> another hint for
>>>>> my encoding Problem?
>>>>>
>>>>> Regars,
>>>>> Thomas
>>>>>
>>>>> "RAP" <tom@code.de> schrieb im Newsbeitrag
>>>>> news:f7iqsk$a0r$1@build.eclipse.org...
>>>>>> Hi,
>>>>>>
>>>>>> hmm, I read the forum entry's but they don't solve my problem. I
>>>>>> added URIEncoding="UTF-8" to my connector
>>>>>> setting for port 8080 and AJP. It ist strange that strings which I
>>>>>> request via a SOAP Request from another server
>>>>>> are correctly displayed (they are UTF-8 encoded). But strings
>>>>>> which came out of the java code or a properties file
>>>>>> are not encoded correctly.
>>>>>>
>>>>>> Bug 187895 says :
>>>>>>
>>>>>> "If I compile in Windows with cp1232 or in MacOS with MacRoman
>>>>>> then all works
>>>>>> fine and all my problems are out."
>>>>>>
>>>>>> What does this mean compile with cp1232? As i know cp1232 is a
>>>>>> kind of character encoding.
>>>>>> Sorry, I never heard this before.
>>>>>>
>>>>>> Regards,
>>>>>> Tom
>>>>>>
>>>>>> "Rüdiger Herrmann" <rherrmann@innoopract.com> schrieb im
>>>>>> Newsbeitrag news:f7iej5$6qa$1@build.eclipse.org...
>>>>>>> Tom,
>>>>>>>
>>>>>>> does one of these hits solve your problem?
>>>>>>> http://www.eclipse.org/search/search.cgi?q=encoding&cmd= Search%21&form=extended&wf=574a74&ps=10&m=al l&t=5&ul=%2Fnewslists%2Fnews.eclipse.technology.rap& amp;wm=wrd&t=News&t=Mail
>>>>>>>
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Rüdiger
>>>>>>>
>>>>>>> RAP wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I have a small problem with my RAP Application deploying in a
>>>>>>>> Tomcat
>>>>>>>> servlet container. The application works fine with Eclipse in
>>>>>>>> the Jetty
>>>>>>>> container under Win XP. But when I deploy the application to a
>>>>>>>> Linux
>>>>>>>> Box with Tomcat 5.5 the german umlauts which are coded in the
>>>>>>>> Application
>>>>>>>> i.e. a Text of a Tab are not displayed correctly.
>>>>>>>>
>>>>>>>> Any hints would be appreciated.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Tom
>>>>>>
>>>>>
>>>>>
Previous Topic:user session
Next Topic:JS Libraries in RAP
Goto Forum:
  


Current Time: Mon Sep 23 14:13:32 GMT 2024

Powered by FUDForum. Page generated in 0.04042 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top