Problem with german Umlaut Characters under Sun Solaris

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Problem with german Umlaut Characters under Sun Solaris

Postby tstalzer » Wed Dec 06, 2006 6:30 am

Hi

If I create a method in Windows containing german Umlaut characters (especially the the character "ö" - is the ASCII code 246) in a string or comment, the method contains garbage when loaded in Sun Solaris.

The garbage does not start right at the end of the method rather a couple characters after the "ö" character.

Both system run the current version 7.0.1 of VA/Smalltalk

Example:

Windows:

Code: Select all
demoFonds
   ^##( (OrderedCollection new)
      add: #'70' "dbPrivatMandant Inv. W";
      add: #'69' "dbPrivatMandant Inv. B";
      add: #'71' "dbPrivatMandant Inv. D";
      add: #'77' "db PrivatMandat Invest E";
      add: #'39' "DWS Vermögensbild.fonds I";
      add: #'88' "DWS Top Dividende";
      add: #'78' "DWS Invest Total Return Bonds";
      add: #'79' "DWS Invest Total Return Flexible";
      add: #'98' "DWS Invest BRIC Plus";
      add: #'1' "DWS Investa";
      add: #'55' "DWS Provesta";
      add: #'2' "DWS Eurovesta";
      add: #'31' "DWS Top 50 Europa";
      add: #'60' "DWS Europa Innovation";
      add: #'40' "DWS Intervest";
      add: #'3' "DWS Akkumula";
      add: #'66' "DWS Vermögensbild.fonds R";
      add: #'25' "DWS Eurorenta";
      add: #'47' "DWS Euro Strategie (Renten)";
      add: #'67' "DWS Euro-Corp Bonds";
      add: #'59' "DWS Globale Sterne";
      add: #'72' "grundbesitz-global";
      add: #'6' "grundbesitz-invest";
      add: #'30' "DWS Top 50 Welt";
      add: #'32' "DWS Top 50 Asien";
      add: #'21' "DWS Nordamerika";
      add: #'23' "DWS Japan-Fonds";
      add: #'36' "DWS Pharmamed";
      add: #'37' "DWS Technologiefonds";
      add: #'74' "DWS Invest Sustainability Leaders";
      add: #'26' "DWS Euro Reserve";
      add: #'99' "DWS Geldmarkt Plus";
      add: #'76' "DWS Select-Rent";
      add: #'4' "DWS Inrenta";
      add: #'75' "DWS Invest Euro-Gov Bonds";
      yourself;
      asArray)

Solaris:

Code: Select all
demoFonds

   ^##( (OrderedCollection new)
      add: #'70' "dbPrivatMandant Inv. W";
      add: #'69' "dbPrivatMandant Inv. B";
      add: #'71' "dbPrivatMandant Inv. D";
      add: #'77' "db PrivatMandat Invest E";
      add: #'39' "DWS Vermögensbild.fonds I";
      add: #'88' "DWS Top Dividende";
      add: #'78' "DWS Invest Total Return Bonds";
      add: #'79' "DWS Invest Total Return Flexible";
      add: #'98' "DWS Invest BRIC Plus";
      add: #'1' "DWS Investa";
      add: #'55' "DWS Provesta";
      add: #'2' "DWS Eurovesta";
      add: #'31' "DWS Top 50 Europa";
      add: #'60' "DWS Europa Innovation";
      add: #'40' "DWS Intervest";
      add: #'3' "DWS Akkumula";
      add: #'66' "DWS Vermögensbildöfonds.I R
      add: #'6625"DWS Eurorenta R
      add: 476625" Euro Strategie (Renten)";a R
67add: 476625  -Corp Returnorenta R
67add: 596625  - Globale Sternea R
67add: 726625grundbesitz-globala R
67add: 66625grundbesitz--invest R
67add: 66625grundbesitz30-ternea Top 50 Welt5grundbesitz30-ternea Top 32 Welt5grundbesitz30 ternea Top Asienelt5grundbesitz30 ternea Top 21ienelt5grundbesitz30  Nordamerikaienelt5grundbesitz30  Nordamerikaienelt5grundbesitz30  Nordamerikaienelt5grundbesitz30  23rdamerikaienelt5grundbesitz30   Japan-Fondsenelt5grundbesitz30   Japan-Fondsenelt5grundbesitz30   36pan- Pharmamedrundbesitz30   36pan- Pharmamedrundbesitz30   37pan-  Technologiefondsundbesitz30   37pan-  Technologiefondsundbesitz30   74pan-   add:  Sustainability Leadersundbesitz30   74pan-   add:  26stainability  dbesitz30 Reserve 26stainability  dbesitz30 Reserve996stainability   Geldmarkt aReserve996stainability   Geldmarkt aReserve996stainability   76ldmarkt  Select-Rentnability   76ldmarkt  Select-4ntnability    Inrentaelect-4ntnability    Inrentaelect-75ntnability     erve996stainability rkt-Gov nelt5grundbesitz30e996stainability rkt-yourself;rkt-yourselfasArray)



Any idea on how we can use the same code base for Windows and Solaris?

Best regards

Thomas
tstalzer
[|]
 
Posts: 65
Joined: Mon Oct 16, 2006 12:07 am
Location: Palma de Mallorca - Spain

Postby tc » Sun Dec 10, 2006 1:35 am

Hello,

It seems to me you would want to change your locale to correct this. Once the default locale is German then vast should pick it up. I found a solaris locale faq at:

http://developers.sun.com/dev/gadc/faq/locale.html

. . . it tells how to find installed locales, switch to them, etc.

HTH.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

We have hat the some Problem

Postby Ralf » Mon Dec 11, 2006 9:20 am

all german Umlauts in Methodes are wrong under Linux/Sun/Aix. The code is wrong, I am not sure how the problem is. But it is so. We have solve the problem, insteed we never, never save umlauts in methodes, all umlauts we have changed to unicode like this:

'\u00f6\u00e4\u00fc'

and our methode "asUnicodeToSozString" will return the string with correct umlauts in the runtime. At begin, we have made a method to replace all umlauts in all our methodes in all our classes. The first time, we have convert to Htmlcode, now we make unicode.
Ralf
 
Posts: 41
Joined: Thu Nov 16, 2006 4:18 am

one more

Postby Ralf » Mon Dec 11, 2006 9:28 am

I have to late seen, the text are comments, i'am so sorry.:-))

but, text in comments its the same problem as text in Strings under Unix.
Ralf
 
Posts: 41
Joined: Thu Nov 16, 2006 4:18 am

Re: Problem with german Umlaut Characters under Sun Solaris

Postby marten » Mon Dec 11, 2006 12:22 pm

tstalzer wrote:Hi

Any idea on how we can use the same code base for Windows and Solaris?



After reading this I decided to restart my SUN workstation this evening, installed 7.01 on this machine (Solaris 9). Copied my mgr70.dat from Windows to the workstation and looked at the result: and I saw no
problems. I can see the German umlauts and all the source is ok.

This does not help you - but for me it seems to work without problems.

Marten
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Postby tstalzer » Mon Dec 18, 2006 8:37 am

Hi

I think, I described the problem not 100% clear. On the Solaris System, the correct codepage is installed and we are able to write comments, code, Strings, etc. with Umlaut character.

However, if I create the following method in Windows and try to access it under Solaris, the code gets confused.

Windows:

Code: Select all
test
   ^##( (OrderedCollection new)
      add: #'70' "dbPrivatMandant Inv. W";
      add: #'69' "dbPrivatMandant Inv. B";
      add: #'71' "dbPrivatMandant Inv. D";
      add: #'77' "db PrivatMandat Invest E";
      add: #'39' "DWS Vermögensbild.fonds I";
      add: #'88' "DWS Top Dividende";
      add: #'78' "DWS Invest Total Return Bonds";
      add: #'79' "DWS Invest Total Return Flexible";
      add: #'98' "DWS Invest BRIC Plus";
      add: #'1' "DWS Investa";
      add: #'55' "DWS Provesta";
      add: #'2' "DWS Eurovesta";
      add: #'31' "DWS Top 50 Europa";
      add: #'60' "DWS Europa Innovation";
      add: #'40' "DWS Intervest";
      add: #'3' "DWS Akkumula";
      add: #'66' "DWS Vermögensbild.fonds R";
      yourself;
      asArray)


Solaris

Code: Select all
test

   ^##( (OrderedCollection new)
      add: #'70' "dbPrivatMandant Inv. W";
      add: #'69' "dbPrivatMandant Inv. B";
      add: #'71' "dbPrivatMandant Inv. D";
      add: #'77' "db PrivatMandat Invest E";
      add: #'39' "DWS Vermögensbild.fonds I";
      add: #'88' "DWS Top Dividende";
      add: #'78' "DWS Invest Total Return Bonds";
      add: #'79' "DWS Invest Total Return Flexible";
      add: #'98' "DWS Invest BRIC Plus";
      add: #'1' "DWS Investa";
      add: #'55' "DWS Provesta";
      add: #'2' "DWS Eurovesta";
      add: #'31' "DWS Top 50 Europa";
      add: #'60' "DWS Europa Innovation";
      add: #'40' "DWS Intervest";
      add: #'3' "DWS Akkumula";
      add: #'66' "DWS Vermögensbildoegensbild.
R   add: #'66yourself;#'66yourself;#'asArray)


Please note, that the german umlaut Characters are in the comments of the method. If I remove the last comment, everything is fine. Also if I move the comment to the end of the method. It only happens in methods using the ##() option (precompile code) and use comments within the brackets using german Umlaut characters (not always, but most of the time).

--Thomas
tstalzer
[|]
 
Posts: 65
Joined: Mon Oct 16, 2006 12:07 am
Location: Palma de Mallorca - Spain

Postby marten » Mon Dec 18, 2006 9:39 am

Ok - I see it. When I try to load this code I get a

compiler error "unterminated comment"
--> "DWS Vermögensbildöfonds.I R
add: yourself; add: asArray

Therefore: the method can not be compiled .... If I look at the
code via browse editions the end of the comment is indeed not
visible on the screen.

Marten
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: one more

Postby tstalzer » Mon Dec 18, 2006 1:13 pm

Ralf wrote:I have to late seen, the text are comments, i'am so sorry.:-))

but, text in comments its the same problem as text in Strings under Unix.


Hi Ralf

converting the comments and Strings/Symbols to Unicode is of course a solution.

I know, we can change the comments and the source programmatically so the conversion of the Umlaut characters to Unicode will be done automatic. However, this does not prevent future code to get messed up again.

--Thomas
tstalzer
[|]
 
Posts: 65
Joined: Mon Oct 16, 2006 12:07 am
Location: Palma de Mallorca - Spain

Postby marten » Mon Dec 18, 2006 1:41 pm

tstalzer wrote:Hi

Code: Select all
test
   ^##( (OrderedCollection new)
      add: #'70' "dbPrivatMandant Inv. W";
      add: #'69' "dbPrivatMandant Inv. B";
      add: #'71' "dbPrivatMandant Inv. D";
      add: #'77' "db PrivatMandat Invest E";
      add: #'39' "DWS Vermögensbild.fonds I";
      add: #'88' "DWS Top Dividende";
      add: #'78' "DWS Invest Total Return Bonds";
      add: #'79' "DWS Invest Total Return Flexible";
      add: #'98' "DWS Invest BRIC Plus";
      add: #'1' "DWS Investa";
      add: #'55' "DWS Provesta";
      add: #'2' "DWS Eurovesta";
      add: #'31' "DWS Top 50 Europa";
      add: #'60' "DWS Europa Innovation";
      add: #'40' "DWS Intervest";
      add: #'3' "DWS Akkumula";
      add: #'66' "DWS Vermögensbild.fonds R";
      yourself;
      asArray)


--Thomas


Ok, another test is quite interesting - it is not possible to enter the code above within VASmalltalk/Solaris. After you execute "save" it will change the source code to the one you mentioned below - but the method is compiled in a correct way.

Marten
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest