Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Roo 1.1.0 release - Problem with UTF8 (german and cyrillic)

  1. #11

    Default

    Quote Originally Posted by berto View Post
    I've also modified my pom.xml according to your advice but that didn't fix the issue with non-WesternEuropean characters.
    Did you roll back all the other changes mentioned in your previous posts (e.g. CharacterEncodingFilter) and left with changed pom only?
    Try to clean up and rebuild your project.
    I had compile time encoding problem, which have been resolved by modifying pom.xml file and adding UTF-8 compile encoding. I found it by debugging my application (string in watch window was incorrect). Also you can log your string.

  2. #12
    Join Date
    Nov 2010
    Posts
    1

    Default

    Quote Originally Posted by berto View Post
    I've also modified my pom.xml according to your advice but that didn't fix the issue with non-WesternEuropean characters.
    Did you roll back all the other changes mentioned in your previous posts (e.g. CharacterEncodingFilter) and left with changed pom only?

    Regards

    I've resolved this by fix pom.xml like this (see the line red, hope this helps):

    Code:
    <plugin>  
        <groupId>org.codehaus.mojo</groupId>  
        <artifactId>aspectj-maven-plugin</artifactId>  
        <version>1.0</version>  
        <dependencies>  
            <!-- NB: You must use Maven 2.0.9 or above or these are ignored (see MNG-2972) -->  
            <dependency>  
                <groupId>org.aspectj</groupId>  
                <artifactId>aspectjrt</artifactId>  
                <version>${aspectj.version}</version>  
            </dependency>  
            <dependency>  
                <groupId>org.aspectj</groupId>  
                <artifactId>aspectjtools</artifactId>  
                <version>${aspectj.version}</version>  
            </dependency>  
        </dependencies>  
        <executions>  
            <execution>  
                <goals>  
                    <goal>compile</goal>  
                    <goal>test-compile</goal>  
                </goals>  
            </execution>  
        </executions>  
        <configuration>  
            <outxml>true</outxml>  
            <aspectLibraries>  
                <aspectLibrary>  
                    <groupId>org.springframework</groupId>  
                    <artifactId>spring-aspects</artifactId>  
                </aspectLibrary>  
            </aspectLibraries>  
            <source>1.6</source>  
            <target>1.6</target>  
            <encoding>UTF-8</encoding>
        </configuration>  
    </plugin>

  3. #13
    Join Date
    Nov 2010
    Posts
    2

    Default UTF-8 with Roo

    Hi, I resolved this issue by disable escaping of form submission contents, move the filter and filter-mapping for CharacterEncoding to the first, and add encoding tags to maven-compile-plugin in my pom.xml.
    That's it.

    Code:
        <context-param>
            <param-name>defaultHtmlEscape</param-name>
            <param-value>false</param-value>
        </context-param>
    .....
        <filter>
            <filter-name>CharacterEncodingFilter</filter-name>
            <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
            <init-param>
                <param-name>encoding</param-name>
                <param-value>UTF-8</param-value>
            </init-param>
            <init-param>
                <param-name>forceEncoding</param-name>
                <param-value>true</param-value>
            </init-param>
        </filter>

  4. #14
    Join Date
    Nov 2010
    Posts
    6

    Default

    Many thanks - it works fine now. The only thing I had to do was to add <encoding>UTF-8</encoding> to my pom file.

  5. #15
    Join Date
    Nov 2010
    Posts
    2

    Default

    Also, if you want to load message files with UTF-8, change messageSource bean in webmvc-config.xml to:
    <bean id="messageSource" p:defaultEncoding="UTF-8"/>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •