help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Iliad: inconsitent encodings?


From: Stefan Schmiedl
Subject: Re: [Help-smalltalk] Iliad: inconsitent encodings?
Date: Sat, 4 Jul 2009 10:32:57 +0200

On Sat, 4 Jul 2009 02:01:54 +0200
Stefan Schmiedl <address@hidden> 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:

address@hidden 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]