Quantcast

How to change grails command line ouput encoding

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

How to change grails command line ouput encoding

qiang
Hi,

Because I use logging to output some chinese string, but the `grails
run-app` use utf8 encoding by default,
How can I change that encoding so the font display is back to okay.

Thanks

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to change grails command line ouput encoding

Graeme Rocher-2
Good question, not sure if it is possible at the moment. Did you try running with -Dfile.encoding=YOUR ENCODING

-- 
Graeme Rocher

On Wednesday, July 25, 2012 at 3:23 AM, Qiang Zhu wrote:

Hi,

Because I use logging to output some chinese string, but the `grails
run-app` use utf8 encoding by default,
How can I change that encoding so the font display is back to okay.

Thanks

---------------------------------------------------------------------
To unsubscribe from this list, please visit:


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to change grails command line ouput encoding

qiang
`-Dfile.encoding=GBK run-app` doesn't work

By some guesswork, I found a workaround, that is to config
ConsoleAppender with specific encoding:

  console name:'stdout', encoding: 'GBK',
layout:pattern(conversionPattern: '%c{2} %m%n')

But that does NOT solve the problem with 'println' related code.

2012/7/25 Graeme Rocher <[hidden email]>:

> Good question, not sure if it is possible at the moment. Did you try running
> with -Dfile.encoding=YOUR ENCODING
>
> --
> Graeme Rocher
>
> On Wednesday, July 25, 2012 at 3:23 AM, Qiang Zhu wrote:
>
> Hi,
>
> Because I use logging to output some chinese string, but the `grails
> run-app` use utf8 encoding by default,
> How can I change that encoding so the font display is back to okay.
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...