Use -Dfile.encoding=utf-8 when starting up Java; you can set it as JVM
default properties in Eclipse.

Kalle

On Tue, Jan 6, 2009 at 11:42 AM, Christoph Jäger <
christoph.jae...@derwald.at> wrote:

> Hi Lutz,
>
> thanks for your thoughts. As far as I can see, the encoding in the
> generated HTML is correct (everything works nicely if the special characters
> come from some different place than a compiled .java file). Additionally, I
> found the same behaviour in graphics generated using JFreeChart (had a m³
> there, which would never render correctly), so it does not seem to be a
> problem with HTML encoding set incorrectly.
>
> I use Eclipse to build my project. The project is organized as several
> plugins, which would be valid OSGi bundles, but I just use Eclipse to export
> the bundles and use them as plain .jar files, which I put into a .war. For
> creating the .war, I use ant, but I think it's already too late here, from
> what I learned and tried out in the past few days, I think Eclipse treats my
> .java files as if they were MACROMAN encoded and "translates" them when
> compiling (I get the same weird characters when I use iconv to convert my
> (UTF-8 encoded) .java files from MACROMAN to UTF-8). The strange thing is:
> if I ask Eclipse about the .java files' properties, it tells me they are
> UTF-8, only the compiler thinks differently. I think the solution involves
> setting the file.encoding system property to UTF-8 (it is MACROMAN now if I
> query it from a java program, but changing the value after startup does not
> make a difference, so I need to set it before the JVM starts).
>
> But it is clearly NOT a tapestry issue, sorry for polluting this mailing
> list.
>
> I'll post a short note as soon as I find time to solve this issue (found a
> workaround now, and need to continue with my project).
>
> Thanks,
>
> Christoph
>
>
> On Jan 2, 2009, at 13:12 , Lutz Hühnken wrote:
>
>  Hm... I think there are many possible points of failure for the
>> encoding...
>>
>> - maybe your browser thinks the page is not utf-8. Is the encoding set
>> correctly either in a http response header or html meta tag?
>>
>> - what do you use for building your project? If you use maven, check
>> the "encoding" argument for the compiler plugin configuration. If it
>> is not set, maven will assume the source files are in the platform
>> default encoding, no matter what eclipse says.
>>
>> Also, as a quick workaround, you could use the html entity &deg; and
>> use t:outputRaw instead of the $ notation.
>>
>> hth,
>>
>> Lutz
>>
>>
>>
>> On Tue, Dec 23, 2008 at 10:24 PM, Christoph Jäger
>> <christoph.jae...@polleninfo.org> wrote:
>>
>>> Hi José,
>>>
>>> the java files seem to be UTF-8. At least Eclipse tells me so, and if I
>>> write some of the special characters to stdout (from a test case, not
>>> running in Tomcat), everything is fine.
>>>
>>> Thanks,
>>>
>>> Christoph
>>>
>>>
>>
>>
>>
>> --
>> altocon GmbH
>> http://www.altocon.de/
>> Software Development, Consulting
>> Hamburg, Germany
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to