You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by egetchell <er...@distributedlogic.com> on 2008/10/31 20:20:40 UTC

S2: Loading UTF-8 Resource Bundles

This is a two-part question.

I am presently integrating internationalized UTF-8 resource bundles that
contain multi-byte characters.  I am familiar with the pre-JDK 6 constraints
of UTF-8 resource bundles – either implement your own loader or convert the
bundles to Unicode.  

First Question.  Is there a mechanism in Struts 2 to plug in a custom
resource bundle loader?  In Struts 1 this was done via the
MessageResourceFactory, but I have not found an equivalent in Struts 2.

Second Question.  If the answer to the above is no, I would like to automate
the Unicode conversion during the build/publish step when doing local
development in Eclipse.  (Our production builds are done via Maven and the
native2ascii conversion is fully supported).  Has anyone had any success
with integrating the custom Builder in Eclipse to invoke the native2ascii
Ant task?  I understand that Eclipse stages classes and resources to the
/build directory, then publishes to the local application server from this
directory.  Invoking native2ascii via a custom Builder works perfect if I
point the destination directory of the Builder to any directory *but* the
/build directory.  However, if I point the output of the native2ascii
Builder to the /build directory, it does not seem to copy or convert the
files.  Ideas?

Thanks

Eric
-- 
View this message in context: http://www.nabble.com/S2%3A-Loading-UTF-8-Resource-Bundles-tp20272586p20272586.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: S2: Loading UTF-8 Resource Bundles

Posted by Manos Batsis <ma...@geekologue.com>.
egetchell wrote:
> I am presently integrating internationalized UTF-8 resource bundles that
> contain multi-byte characters.  I am familiar with the pre-JDK 6 constraints
> of UTF-8 resource bundles – either implement your own loader or convert the
> bundles to Unicode.  

Don't you mean ASCII?

AFAIK resource bundles are loaded using the default platform encoding. 
Using native2ascii binary either directly or through your build 
tasks/goals gives the expected results pretty much anywhere.

Custom "resource bundle loaders" where there in S1 but, unfortunately, 
i'm clueless on S2.

hth,

Manos

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org