Encoding of CSS loaded in FileLibrary

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

Encoding of CSS loaded in FileLibrary

Damien Pollet
yes, encodings once again :)

My CSS has UTF8 content that gets displayed: I'm using foo:after {
contents: '»'; } (that's a french closing guillemot in there, looks
like >> )

I'm loading it in a subclass of WAFileLibrary using #addAllFilesIn:

When I use WAKom, the guillemot becomes an error character. With
WAKomEncoded it's displayed correctly. but then I can't use some
characters when editing pages.

My understanding was that WAKomEncoded converts to the squeak internal
representation, and WAKom does nothing, so WAKom should work (as long
as I have UTF in my files, which is the case), and WAKomEncoded could
fail if it tries to convert what's in the FileLibrary from squeak to
utf before serving…

Why is it the reverse in practice?


--
Damien Pollet
type less, do more [ | ] http://typo.cdlm.fasmz.org


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Encoding of CSS loaded in FileLibrary

Philippe Marschall
2007/11/18, Damien Pollet <[hidden email]>:

> yes, encodings once again :)
>
> My CSS has UTF8 content that gets displayed: I'm using foo:after {
> contents: '»'; } (that's a french closing guillemot in there, looks
> like >> )
>
> I'm loading it in a subclass of WAFileLibrary using #addAllFilesIn:
>
> When I use WAKom, the guillemot becomes an error character. With
> WAKomEncoded it's displayed correctly. but then I can't use some
> characters when editing pages.
>
> My understanding was that WAKomEncoded converts to the squeak internal
> representation, and WAKom does nothing, so WAKom should work

no, not at all

> (as long
> as I have UTF in my files

yes

> which is the case),

Which might be the case of the file on your file system. Which is
probably not the case of the literal string in your file library
class. This string very likely has Squeak encoding.

> and WAKomEncoded could
> fail if it tries to convert what's in the FileLibrary from squeak to
> utf before serving…

The contents are likely Squeak.

Cheers
Philippe

> Why is it the reverse in practice?
>
>
> --
> Damien Pollet
> type less, do more [ | ] http://typo.cdlm.fasmz.org
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Encoding of CSS loaded in FileLibrary

Damien Pollet
On 18/11/2007, Philippe Marschall <[hidden email]> wrote:
> Which might be the case of the file on your file system. Which is
> probably not the case of the literal string in your file library
> class. This string very likely has Squeak encoding.

Ah indeed it is. I assumed the loading didn't try to convert.

--
Damien Pollet
type less, do more [ | ] http://typo.cdlm.fasmz.org

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki