Hi Ray!

The properties files should be in ascii encoding and the unicode characters 
should be escaped with \u, for example "\u0161" for š character. JDK 
comes with native2ascii tool that does the conversion.
I have seen an eclipse property editor plugin which saves properties files in 
this format, but I myself use the following ant script to convert them.

<project name="Catalog" default="native" basedir=".">
    <property name="native" value="${basedir}/src/main/native"/>
    <property name="resources" value="${basedir}/src/main/resources"/>
    <property name="webapp" value="${basedir}/src/main/webapp"/>

        <target name="native" description="Translates resource files from 
native encoding to ascii. Used by eclipse automated build">
                <native2ascii encoding="windows-1257" src="${native}" 
dest="${webapp}/WEB-INF" includes="**/${ant.project.name}_lv.properties"/>
                <native2ascii encoding="windows-1257" src="${native}" 
dest="${resources}" includes="**/*_lv.properties" 
excludes="**/${ant.project.name}_lv.properties"/>
        </target>
 </project>

It can be configured to run automatically when a property file changes or run 
manually, or run by a build script.

This converts tapestry main properties file and other native (latvian) files 
under /src/main/native in the respective packages

You have to replace the encoding attribute with the encoding of your files, and 
update suffix (from _lv to _es). If you have more than one language that needs 
converting, you will have to get creative with that script.

Best Regards,
Imants

Quoting Ray <[EMAIL PROTECTED]>:
> Hi there,
> 
> I have a problem in parsing Spanish phrases with special chars. The
> original
> message defined is something like:
> 
> DESCRIPTION=Descripción
> 
> comes back as:
> 
> Descripti?n
> 
> from the Messages object. My file format is UTF-8 and my page has the
> appropriate header defined.
> 
> Is there something completely obvious im missing here? Ive tried various
> workrounds, such as defining the unicode escape chars for the special
> chars
> which work for the web page. Problem then is in populating values in a
> dropdown menu where all the unicode escape chars come back as their
> literal
> string equivalents.
> 
> Cheers,
> 
> Ray.


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

Reply via email to