[Seaside] Multilingual Website (Euro & Asian languages)

Philippe Marschall philippe.marschall at gmail.com
Fri Oct 13 11:09:46 UTC 2006


2006/10/13, Sébastien Rocca-Serra <sebastien.roccaserra at f4-group.com>:
> > is it a Package ?
> No, but loading Damien's ImageForDevelopers will smoothly ask and
> install all you need.
> (Cheers Damien, incredibly useful participation !)
>
> > you can use google with:
> > site:http://lists.squeakfoundation.org language translation
> Great, thanks !
>
> > The only working sever adaptor for non-ASCII Text in Squeak 3.9 is
> > WAKomEndcoded39.
> Yes, that's what I'm using.
> It displays European accented characters fine (which WAKom doesn't), but
> I still can't display Asian characters...
>
> I also read Yoshiki's Multilingualized Squeak page, but I still can't
> display Chinese or Japanese text in my image or website.
>
> Any suggestions ?

Well the problem I have is I don't know how to paste Japanse text
intoSqueak. If I take for example Hiragana from the UTF-8 sampler [1]
I get "javascript encoded uunicode" just see for yourself:

'\u3044\u308d\u306f\u306b\u307b\u3078\u3069\u3000\u3061\u308a\u306c\u308b\u3092
\u308f\u304c\u3088\u305f\u308c\u305e\u3000\u3064\u306d\u306a\u3089\u3080
\u3046\u3090\u306e\u304a\u304f\u3084\u307e\u3000\u3051\u3075\u3053\u3048\u3066
\u3042\u3055\u304d\u3086\u3081\u307f\u3058\u3000\u3091\u3072\u3082\u305b\u305a'

You probably have to go to squeak-dev with this problem.

But once I converted it to a Squeak WideString everything did as it
should (only in the inspector the WideString shows up as '????????').

renderUnicodeOn: html
	| encoded codePoints unicode |
	encoded := '\u3044\u308d\u306f\u306b\u307b\u3078\u3069\u3000\u3061\u308a\u306c\u308b\u3092
\u308f\u304c\u3088\u305f\u308c\u305e\u3000\u3064\u306d\u306a\u3089\u3080
\u3046\u3090\u306e\u304a\u304f\u3084\u307e\u3000\u3051\u3075\u3053\u3048\u3066
\u3042\u3055\u304d\u3086\u3081\u307f\u3058\u3000\u3091\u3072\u3082\u305b\u305a'.
	
	codePoints := (encoded findTokens: '\u') collect: [ :each |
		Integer readFrom: each asUppercase readStream base: 16 ].
		
	unicode := WideString streamContents: [ :stream |
		codePoints do: [ :each |
			stream nextPut: (Character value: each) ] ].
	
	html text: unicode

I would be great to have non-Latin 1 tests in Seaside the problem is
just that this is highly platform specific.

Philippe

[1] http://www.columbia.edu/kermit/utf8.html


More information about the Seaside mailing list