String encoding

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

String encoding

Igor Stasenko
I'm using seaside 2.8 with 3.10 image, and it's not rendering non-iso strings :(

In source code a string literal like 'ÄÄÄÄÄÄÄ'
is rendered with '????????' in browser (page encoding is utf-8),
but if i put:  'ÄÄÄÄÄÄÄ' isoToUtf8 it rendered correctly with browser.
Any advice how i can get these literals rendered correctly by seaside
without placing explicit #isoToUtf8 each time?


--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: String encoding

Igor Stasenko
okay, i figured it out by implementing a #charSet method in my session
subclass to return iso charset instead of utf-8.



--
Best regards,
Igor Stasenko AKA sig.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: String encoding

Philippe Marschall
2008/4/22, Igor Stasenko <[hidden email]>:
> okay, i figured it out by implementing a #charSet method in my session
>  subclass to return iso charset instead of utf-8.

That sounds more like a hack until the problem gives up rather than a
fix. Could you answer:
- what encoding your web page should have
- what encoding the strings in your image should have

Since you are dealing with Squeak literals, it might be better to use
WAKomEncoded and utf-8 in the web and Squeak encoding in your image.

Cheers
Philipe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: String encoding

Igor Stasenko
2008/4/22 Philippe Marschall <[hidden email]>:

> 2008/4/22, Igor Stasenko <[hidden email]>:
>
> > okay, i figured it out by implementing a #charSet method in my session
>  >  subclass to return iso charset instead of utf-8.
>
>  That sounds more like a hack until the problem gives up rather than a
>  fix. Could you answer:
>  - what encoding your web page should have
>  - what encoding the strings in your image should have
>

'ISO-8859-1' for both web page & squeak.
But of course, i would prefer using utf-8 for webpage and let seaside
auto-translate my strings from ISO-8859-1

>  Since you are dealing with Squeak literals, it might be better to use
>  WAKomEncoded and utf-8 in the web and Squeak encoding in your image.
>
Can you be more specific, where i can set preferences or make changes
to achieve above?

>  Cheers
>  Philipe
>  _______________________________________________
>  seaside mailing list
>  [hidden email]
>  http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



--
Best regards,
Igor Stasenko AKA sig.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: String encoding

Philippe Marschall
2008/4/22, Igor Stasenko <[hidden email]>:

> 2008/4/22 Philippe Marschall <[hidden email]>:
>
> > 2008/4/22, Igor Stasenko <[hidden email]>:
>  >
>  > > okay, i figured it out by implementing a #charSet method in my session
>  >  >  subclass to return iso charset instead of utf-8.
>  >
>  >  That sounds more like a hack until the problem gives up rather than a
>  >  fix. Could you answer:
>  >  - what encoding your web page should have
>  >  - what encoding the strings in your image should have
>  >
>
>
> 'ISO-8859-1' for both web page & squeak.
>  But of course, i would prefer using utf-8 for webpage and let seaside
>  auto-translate my strings from ISO-8859-1

If you want ISO-8859-1:
- be sure you really want ISO-8859-1, strictly speaking ISO-8859-1
does not even include the Euro symbol but most browsers are not that
picky
- use ISO-8859-1 both on the web page and in Squeak (this avoids many problems)
- implement the #charSet method in your session class and return 'iso-8859-1'
- use WAKom

>  >  Since you are dealing with Squeak literals, it might be better to use
>  >  WAKomEncoded and utf-8 in the web and Squeak encoding in your image.
>  >
>
> Can you be more specific, where i can set preferences or make changes
>  to achieve above?

- if you use Squeak 3.10 or 3.9.1 be sure to update to Seaside 2.8.1
- remove the #charSet method from your session class (use the one from
WASession, 'utf-8')
- WAKom stop.
- WAKomEncoded startOn: thePort

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: String encoding

Igor Stasenko
2008/4/22 Philippe Marschall <[hidden email]>:

> 2008/4/22, Igor Stasenko <[hidden email]>:
>  > 2008/4/22 Philippe Marschall <[hidden email]>:
>  >
>  > > 2008/4/22, Igor Stasenko <[hidden email]>:
>  >  >
>  >  > > okay, i figured it out by implementing a #charSet method in my session
>  >  >  >  subclass to return iso charset instead of utf-8.
>  >  >
>  >  >  That sounds more like a hack until the problem gives up rather than a
>  >  >  fix. Could you answer:
>  >  >  - what encoding your web page should have
>  >  >  - what encoding the strings in your image should have
>  >  >
>  >
>  >
>  > 'ISO-8859-1' for both web page & squeak.
>  >  But of course, i would prefer using utf-8 for webpage and let seaside
>  >  auto-translate my strings from ISO-8859-1
>
>  If you want ISO-8859-1:
>  - be sure you really want ISO-8859-1, strictly speaking ISO-8859-1
>  does not even include the Euro symbol but most browsers are not that
>  picky
>  - use ISO-8859-1 both on the web page and in Squeak (this avoids many problems)
>  - implement the #charSet method in your session class and return 'iso-8859-1'
>  - use WAKom
>

Yes, that how its currently works.

>
>  >  >  Since you are dealing with Squeak literals, it might be better to use
>  >  >  WAKomEncoded and utf-8 in the web and Squeak encoding in your image.
>  >  >
>  >
>  > Can you be more specific, where i can set preferences or make changes
>  >  to achieve above?
>
>  - if you use Squeak 3.10 or 3.9.1 be sure to update to Seaside 2.8.1
>  - remove the #charSet method from your session class (use the one from
>  WASession, 'utf-8')
>  - WAKom stop.
>  - WAKomEncoded startOn: thePort
>

Aha, and here is alternative for making squeak use own encoding, but
render page with different encoding.
Thank you for enlightenment :)

>  Cheers
>  Philippe
>
>
> _______________________________________________
>  seaside mailing list
>  [hidden email]
>  http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



--
Best regards,
Igor Stasenko AKA sig.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside