Seaside text encoding

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

Seaside text encoding

keropotter
Hi!!

I'm having trouble with text encoding; specifically, with spanish characters such as acutes.

For instance, if I type "Administración" in my code, seaside displays it as "Administraci�n". Additionally, if I type it with html entities ("Administración"), seaside doesn't parse them properly, giving me that exact text as output.

I haven't been able to find information on where to change text encoding for this to work.

Could anybody point me in the right direction?

Thanks in advance!!
Alejandro
Reply | Threaded
Open this post in threaded view
|

Re: Seaside text encoding

Philippe Marschall
2011/9/16 keropotter <[hidden email]>:
> Hi!!
>
> I'm having trouble with text encoding; specifically, with spanish characters
> such as acutes.

Which version of Seaside are you using? Which server are you using?
What's the coded on the server? What's the encoding configured on the
application? If you view the page info in Firefox what does it say
that the encoding is? Do you develop in Pharo and deploy in GemStone?
If you inspect the String in Gemstone does it display correctly? Can
you attach a screenshot of the Seaside page?

> For instance, if I type "Administración" in my code, seaside displays it as
> "Administraci�n". Additionally, if I type it with html entities
> ("Administraci&oacute;n"), seaside doesn't parse them properly, giving me
> that exact text as output.

Seaside should never do &oacute;. Seaside should pick up the encoding
you want form the server use that and tell the browser about it.
Somewhere something went wrong, maybe in the source file encoding.

Cheers
Philippe
Reply | Threaded
Open this post in threaded view
|

Re: Seaside text encoding

Nick
In reply to this post by keropotter
Hi 

For instance, if I type "Administración" in my code, seaside displays it as
"Administraci�n". Additionally, if I type it with html entities
("Administraci&oacute;n"), seaside doesn't parse them properly, giving me
that exact text as output.

Within a render method use the #html: method:

renderSomeSpanishCharactersOn: html
    html html:  'Administraci&oacute;n'.

Alternatively you can construct the string using Character value: 16rf3


Reply | Threaded
Open this post in threaded view
|

Re: Seaside text encoding

keropotter
Thank you all very much!

As Phillipe talked about application configuration, I went to the config section of the application and changed "utf-8" to "iso-8859-1" and it now works ok.

Tanks again!
Alejandro

On Fri, Sep 16, 2011 at 12:42 PM, Nick [via Smalltalk] <[hidden email]> wrote:
Hi 

For instance, if I type "Administración" in my code, seaside displays it as
"Administraci�n". Additionally, if I type it with html entities
("Administraci&oacute;n"), seaside doesn't parse them properly, giving me
that exact text as output.

Within a render method use the #html: method:

renderSomeSpanishCharactersOn: html
    html html:  'Administraci&oacute;n'.

Alternatively you can construct the string using Character value: 16rf3





If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Seaside-text-encoding-tp3818370p3818409.html
To unsubscribe from Seaside text encoding, click here.

Reply | Threaded
Open this post in threaded view
|

Re: Seaside text encoding

Philippe Marschall
2011/9/16 keropotter <[hidden email]>:
> Thank you all very much!
>
> As Phillipe talked about application configuration, I went to the config
> section of the application and changed "utf-8" to "iso-8859-1" and it now
> works ok.

That's not the real fix. It looks to as if you're running a NullCodec.
Make sure our using a utf-8 codec on the server.

Cheers
Philippe
Reply | Threaded
Open this post in threaded view
|

Re: Seaside text encoding

Philippe Marschall
In reply to this post by Nick
2011/9/16 Nick Ager <[hidden email]>:

> Hi
>
>> For instance, if I type "Administración" in my code, seaside displays it
>> as
>> "Administraci�n". Additionally, if I type it with html entities
>> ("Administraci&oacute;n"), seaside doesn't parse them properly, giving me
>> that exact text as output.
>
> Within a render method use the #html: method:
> renderSomeSpanishCharactersOn: html
>     html html:  'Administraci&oacute;n'.

Noooohhhhh, that just hides the fact that something in the encoding
pipeline / configuration is broken. Until you fix this you'll get
bitten by this in various other places.

Cheers
Philippe
Reply | Threaded
Open this post in threaded view
|

Re: Seaside text encoding

Dale Henrichs
In reply to this post by keropotter
Alejandro,

I am interested in the versions of the various pieces of the system you are using.

For example, I've included the following line:

  html text: 'Administración'

compiled into a GemStone2.4 and GemStone3.0 render method running:

  GLASS 1.0-beta.8.6
  Seaside 3.0.6
  Swazoo 2.2.0.4
  FastCGI 0.234

I've tested the display of that string using both Swazoo and FastCGI and in all cases the string is displayed correctly ...

So I'll need a little more information to determine what might be wrong in your setup.

Dale

----- Original Message -----
| From: "keropotter" <[hidden email]>
| To: [hidden email]
| Sent: Friday, September 16, 2011 8:27:56 AM
| Subject: [GS/SS Beta] Seaside text encoding
|
| Hi!!
|
| I'm having trouble with text encoding; specifically, with spanish
| characters
| such as acutes.
|
| For instance, if I type "Administración" in my code, seaside displays
| it as
| "Administraci�n". Additionally, if I type it with html entities
| ("Administraci&oacute;n"), seaside doesn't parse them properly,
| giving me
| that exact text as output.
|
| I haven't been able to find information on where to change text
| encoding for
| this to work.
|
| Could anybody point me in the right direction?
|
| Thanks in advance!!
| Alejandro
|
| --
| View this message in context:
| http://forum.world.st/Seaside-text-encoding-tp3818370p3818370.html
| Sent from the GLASS mailing list archive at Nabble.com.
|
Reply | Threaded
Open this post in threaded view
|

Re: Seaside text encoding

keropotter
Dale,

Sorry for the delay! I've configured Swazoo properly with UTF-8 encoding as suggested by Phillippe and it now works like a charm. By the way, I'm working on Pharo 1.2.1 and Seaside 3.0.

Thanks for your time!!
Alejandro

On Fri, Sep 16, 2011 at 5:49 PM, Dale Henrichs [via Smalltalk] <[hidden email]> wrote:
Alejandro,

I am interested in the versions of the various pieces of the system you are using.

For example, I've included the following line:

  html text: 'Administración'

compiled into a GemStone2.4 and GemStone3.0 render method running:

  GLASS 1.0-beta.8.6
  Seaside 3.0.6
  Swazoo 2.2.0.4
  FastCGI 0.234

I've tested the display of that string using both Swazoo and FastCGI and in all cases the string is displayed correctly ...

So I'll need a little more information to determine what might be wrong in your setup.

Dale

----- Original Message -----
| From: "keropotter" <[hidden email]>
| To: [hidden email]
| Sent: Friday, September 16, 2011 8:27:56 AM
| Subject: [GS/SS Beta] Seaside text encoding
|
| Hi!!
|
| I'm having trouble with text encoding; specifically, with spanish
| characters
| such as acutes.
|
| For instance, if I type "Administración" in my code, seaside displays
| it as
| "Administraci�n". Additionally, if I type it with html entities
| ("Administraci&oacute;n"), seaside doesn't parse them properly,
| giving me
| that exact text as output.
|
| I haven't been able to find information on where to change text
| encoding for
| this to work.
|
| Could anybody point me in the right direction?
|
| Thanks in advance!!
| Alejandro
|
| --
| View this message in context:
| http://forum.world.st/Seaside-text-encoding-tp3818370p3818370.html
| Sent from the GLASS mailing list archive at Nabble.com.
|



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Seaside-text-encoding-tp3818370p3819112.html
To unsubscribe from Seaside text encoding, click here.