Hi,
I am using Seaside with FusionCharts. XML data file for FusionCharts is generated by this code: url := (html urlForAction: [ self session returnResponse: (Seaside.WAResponse new contentType: 'text/xml'; nextPut: 239 asCharacter; nextPut: 187 asCharacter; nextPut: 191 asCharacter; nextPutAll: chart xmlString; yourself) ]). 239, 187 and 191 characters is BOM mark for UTF-8 (EF BB BF) - but this 3 characters are messed in responce to "C3 AF C2 BB C2 BF" - what is wrong? Thanks very much for suggestions, Petr Fischer (VW7.6dev, mac os x) _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
At 08:14 AM 3/6/2008, Petr Fischer wrote:
>239, 187 and 191 characters is BOM mark for UTF-8 (EF BB BF) - but >this 3 characters are messed in responce to "C3 AF C2 BB C2 BF" - what >is wrong? Response stream needs to be set to UTF-8 ? M _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
BOM characters (EF BB BF) are still messed (translated to: C3 AF C2 BB
C2 BF ) Code: url := (html urlForAction: [ resp := (Seaside.WAResponse new contentType: 'text/xml;charset=utf-8'; nextPut: 239 asInteger; nextPut: 187 asCharacter; nextPut: 191 asCharacter; nextPutAll: chart xmlString; yourself). self session returnResponse: resp. ]). On 6.3.2008, at 1:56, Mark D. Roberts wrote: >> >> Which method? >> ("WAResponse stream" is ReadWriteStream) > > This is really just a guess, but don't you need to do something like: > > contentType: 'text/xml;charset=utf-8' > > > HTH, > > M _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
I think you need something like:
Seaside.WAResponse new contentType: 'text/xml;charset=utf-8'; nextPut: 16rFEFF asCharacter; nextPutAll: chart xmlString; yourself You need to let the underlying transport do the utf-8 encoding of the BOM mark (U+FEFF) HTH, Martin Petr Fischer wrote: > BOM characters (EF BB BF) are still messed (translated to: C3 AF C2 BB > C2 BF ) > > Code: > url := (html urlForAction: [ > resp := (Seaside.WAResponse new > contentType: 'text/xml;charset=utf-8'; > nextPut: 239 asInteger; > nextPut: 187 asCharacter; > nextPut: 191 asCharacter; > nextPutAll: chart xmlString; > yourself). > self session returnResponse: resp. > ]). vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Petr Fischer-3
Do you actually /need/ a BOM header in the case of utf8? (I know his doesn't fix the actual problem, but might get you to move forward quickly). R - On Mar 6, 2008, at 2:08 AM, Petr Fischer wrote: > BOM characters (EF BB BF) are still messed (translated to: C3 AF C2 BB > C2 BF ) > > Code: > url := (html urlForAction: [ > resp := (Seaside.WAResponse new > contentType: 'text/xml;charset=utf-8'; > nextPut: 239 asInteger; > nextPut: 187 asCharacter; > nextPut: 191 asCharacter; > nextPutAll: chart xmlString; > yourself). > self session returnResponse: resp. > ]). > > On 6.3.2008, at 1:56, Mark D. Roberts wrote: >>> >>> Which method? >>> ("WAResponse stream" is ReadWriteStream) >> >> This is really just a guess, but don't you need to do something like: >> >> contentType: 'text/xml;charset=utf-8' >> >> >> HTH, >> >> M > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Reinout Heeck wrote:
> Do you actually /need/ a BOM header in the case of utf8? > > (I know his doesn't fix the actual problem, but might get you to move > forward quickly). That's also my question. I first time hear that BOM is needed in UTF8 and I never use it here. But it is definitively needed in UTF-16 or UTF-32, to determine byte order (big-endian/little-endian). Janko > > R > - > > > > On Mar 6, 2008, at 2:08 AM, Petr Fischer wrote: > >> BOM characters (EF BB BF) are still messed (translated to: C3 AF C2 BB >> C2 BF ) >> >> Code: >> url := (html urlForAction: [ >> resp := (Seaside.WAResponse new >> contentType: 'text/xml;charset=utf-8'; >> nextPut: 239 asInteger; >> nextPut: 187 asCharacter; >> nextPut: 191 asCharacter; >> nextPutAll: chart xmlString; >> yourself). >> self session returnResponse: resp. >> ]). >> >> On 6.3.2008, at 1:56, Mark D. Roberts wrote: >>>> Which method? >>>> ("WAResponse stream" is ReadWriteStream) >>> This is really just a guess, but don't you need to do something like: >>> >>> contentType: 'text/xml;charset=utf-8' >>> >>> >>> HTH, >>> >>> M >> _______________________________________________ >> vwnc mailing list >> [hidden email] >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc >> > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by kobetic
Thanks very much Martin. It works now. pf
On 6.3.2008, at 4:00, Martin Kobetic wrote: > I think you need something like: > > Seaside.WAResponse new > contentType: 'text/xml;charset=utf-8'; > nextPut: 16rFEFF asCharacter; > nextPutAll: chart xmlString; > yourself > > You need to let the underlying transport do the utf-8 encoding of > the BOM mark (U+FEFF) > > HTH, > > Martin > > Petr Fischer wrote: >> BOM characters (EF BB BF) are still messed (translated to: C3 AF C2 >> BB C2 BF ) >> Code: >> url := (html urlForAction: [ >> resp := (Seaside.WAResponse new >> contentType: 'text/xml;charset=utf-8'; >> nextPut: 239 asInteger; >> nextPut: 187 asCharacter; >> nextPut: 191 asCharacter; >> nextPutAll: chart xmlString; >> yourself). >> self session returnResponse: resp. >> ]). > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Janko Mivšek
Yes, FusionCharts needs BOM for correctly displaying accent characters.
Martin Kobetic solved problem by: nextPut: 16rFEFF asCharacter; Thanks to all, pf p.s. I can share simple (working) FusionCharts binding (for seaside and vw) in future as a revenge. On 6.3.2008, at 9:55, Janko Mivšek wrote: > Reinout Heeck wrote: >> Do you actually /need/ a BOM header in the case of utf8? >> >> (I know his doesn't fix the actual problem, but might get you to move >> forward quickly). > > That's also my question. I first time hear that BOM is needed in UTF8 > and I never use it here. But it is definitively needed in UTF-16 or > UTF-32, to determine byte order (big-endian/little-endian). > > Janko > > >> >> R >> - >> >> >> >> On Mar 6, 2008, at 2:08 AM, Petr Fischer wrote: >> >>> BOM characters (EF BB BF) are still messed (translated to: C3 AF >>> C2 BB >>> C2 BF ) >>> >>> Code: >>> url := (html urlForAction: [ >>> resp := (Seaside.WAResponse new >>> contentType: 'text/xml;charset=utf-8'; >>> nextPut: 239 asInteger; >>> nextPut: 187 asCharacter; >>> nextPut: 191 asCharacter; >>> nextPutAll: chart xmlString; >>> yourself). >>> self session returnResponse: resp. >>> ]). >>> >>> On 6.3.2008, at 1:56, Mark D. Roberts wrote: >>>>> Which method? >>>>> ("WAResponse stream" is ReadWriteStream) >>>> This is really just a guess, but don't you need to do something >>>> like: >>>> >>>> contentType: 'text/xml;charset=utf-8' >>>> >>>> >>>> HTH, >>>> >>>> M >>> _______________________________________________ >>> vwnc mailing list >>> [hidden email] >>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc >>> >> >> _______________________________________________ >> vwnc mailing list >> [hidden email] >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc >> > > -- > Janko Mivšek > AIDA/Web > Smalltalk Web Application Server > http://www.aidaweb.si > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |