On Sat, 4 Jul 2009 02:01:54 +0200
Stefan Schmiedl <[email protected]> wrote:

> Gerätetreiber    (*) weiß nicht  ( ) ja  ( ) nein
> 
> Ger�tetreiber    ( ) wei� nicht  (*) ja  ( ) nein
> 
> I suspect that JSON based responses are passed along without going
> through the same encoding steps as "normal" responses. I'm pretty
> sure that the "normal" responses are converted somewhere, as I'm
> passing the text in as ISO-8859-1 (well, actually win-1252) and the
> browser receives UTF-8, JSON responses being the exception.
> 
> Nevertheless, it was a successful evening,

and it's starting out as a beautiful morning, too: A quick and probably
dirty hack to fix this behavior is letting GSTEncoder at the response:

ste...@g128 trunk $ svn diff
Index: Core/RequestHandlers/JsonHandler.st
===================================================================
--- Core/RequestHandlers/JsonHandler.st (revision 1379)
+++ Core/RequestHandlers/JsonHandler.st (working copy)
@@ -65,8 +65,8 @@
                        scripts add: child]]].
            jsonContents at: 'widgets' put: widgets.
            jsonContents at: 'scripts' put: scripts.
-           response nextPutAll: (String streamContents: [:stream |
-               jsonContents printJsonOn: stream]).
+           response nextPutAll: ( GSTEncoder encode: (String streamContents: 
[:stream |
+               jsonContents printJsonOn: stream]) ).
            self session
                clearDirtyWidgets;
                clearRedirectUrl]

s.


_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to