Dennis hi

Unfortunately I do not have enough time to look at this deeply, but anyway -
see below...

2008/12/15 Dennis Schetinin <chae...@gmail.com>

> Hi all!
>
> I'm trying to "localize" Pharo to be able to see and to type in russian
> letters. After (already many) hours I have no progress.
>
> Here details go...
>
> What I use:
>
> SmalltalkImage current vmVersion          'Squeak3.9 of 7 November 2006
> [latest update: #7067]'
> "About Squeak on Win32"                      'Squeak 3.10.6 (release) from
> Aug 30 2007'
> Size of Squeak.exe is 985600 bytes...


This VM is fine. I'm using it  on windows xp with russian support enabled.

>
>
> pharo0.1-10193dev08.12.2.image
> bunch of DLLs new VM including freetype6.dl
>
>
> So far I see windows fonts in preferences.



> Now I try Locale switchToID: (LocaleID isoLanguage: 'ru').
>
> This throws an exception in StrikeFont class >> setupDefaultFallbackFont
> (no #Accuat #Accujen #Accula etc. in the system).
> I just comment that out and go on.

An exception in PainBoxMorph class >> localeChanged. The same 'decision'.
> So far, locale seems to be russian...
>

I assume these workarounds are also fine, if you are able to enter Russian
text. However I don't see UTFClipboardInterpeter in Pharo, so you should
have a problem with copy/paste. You can fileout it from squeak 3.9 though.

>
> Then I change fonts to one from windows (I tried Arial, Courier New, Times
> New Roman).
>
> After that I open workspace (having font there changed) and 'print it':
>
>   file := MultiByteFileStream fileNamed:
> 'c:\Home\chaetal\Work\Pharo\russian\russian.txt'.
>   [file contents] ensure: [file close].
>

MultiByteFileStream doesn't know the encoding of the file and it uses system
encoding as its best guess. 'TextConverter defaultSystemConverter' should
yield  ->an UTF8TextConverter in your case. If it does not - you may try to
set an instance of UTF8TextConverter as a converter for MultiByteFileStream
(instance side API).


> (where russian.txt is UTF-8 file with russian text).
>
> This gives me a bunch of question marks... :(
>

Now these marks. To display Russian text you have to enable unicode font in
places where you'd like to see it. For panes it is probably 'default text
font' which needs to be set. You did it, right? Do you see, let's say, text
rendered with Arial font in newly created workspaces?

regards,
  Danil


> Switching on 'useLocale' preference gives a bit different locale id
> ('ru-RU') but the test with russian file still fails.
>
> I also tried to start Pharo with '-encoding UTF-8 -textenc UTF-8' keys.
> Than it simply hangs...
>
> Advices at
>   http://wiki.squeak.org/squeak/5773
> don't help either...
>
>
> Thank you for help in advance...
>
>
> I've heard there's new VM? Where can I get it?
>
> --
> Dennis Schetinin
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to