[Mav-user] Character encoding in transforms

2006-01-05 Thread Peter Chase
Hi,

I have been happily using Maverick in my Velocity-based Web application 
for a long time. However, only now am I trying to make my Web application 
display non-ASCII characters, using UTF-8 encoding. It's not working.

I find that pages that are generated by a simple view, with no transforms, 
come out correctly. But pages that are generated by a view (DocumentView) 
with transforms (DocumentTransform) come out with their non-ASCII 
characters garbled.

I didn't find much about character encoding in the Maverick documentation, 
so I resorted to UTSL.

I see that the FakeHttpServletResponse and ServletOutputStreamBuffer 
classes both have a charset field. However, I cannot see any code that 
ever sets the charset. That's a shame, because these classes seem to be 
crucial to how StringTransformStep, used in DocumentTransform, work.

There are some source code comments that suggest that the charset will get 
set to a value obtained from the content type. But I cannot see anything 
that actually does that?

Have I found a bug, or am I misunderstanding how the code works, or how I 
am supposed to use Maverick for non-ASCII encoding?


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
[INVALID FOOTER]


[Mav-user] Re: Character encoding in transforms

2006-01-05 Thread Peter Chase
Following up on my previous message, I can confirm that character encoding 
in ServletOutputStreamBuffer does seem to be the cause of the problem. I 
made a local build of Maverick from version 2.2.3 and hard-coded charset 
to UTF-8 in ServletOutputStreamBuffer. This fixed all my problems with 
character encoding in views with transforms.

My modification is not suitable as a patch to Maverick, because it just 
hard-codes UTF-8. I may have time to work up something better.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
[INVALID FOOTER]


[Mav-user] Character encoding patch?

2006-01-05 Thread Peter Chase
Is anything wrong with the following patch, to make Maverick transforms 
automatically pick up the character encoding?

public FakeHttpServletResponse(HttpServletResponse wrapMe)
{
super(wrapMe);

if (log.isDebugEnabled())
log.debug(Creating fake response, original buffer 
size is 
+ wrapMe.getBufferSize());

this.charset = wrapMe.getCharacterEncoding();  // THIS IS 
THE NEW LINE
}



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
[INVALID FOOTER]