Cyrillic problems

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Cyrillic problems

Andreas Kohl
Hi,

when viewing cyrillic websites (with encoding Windows-1251) the title
bar only displays question marks (????????) while the tabs show cyrillic
letters correctly.
This occurs in Firefox and Seamonkey.

Regards,
Andreas Kohl
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Stan Goodman-2
On Mon, 10 Jul 2006 00:11:06 UTC, Andreas Kohl <[hidden email]> opined:
> Hi,
>
> when viewing cyrillic websites (with encoding Windows-1251) the title
> bar only displays question marks (????????) while the tabs show cyrillic
> letters correctly.
> This occurs in Firefox and Seamonkey.
>
> Regards,
> Andreas Kohl

I assume that this is because the title bar is governed by systems settings,
while the tabs are under the control of the browser's settings notebook.

--
Stan Goodman
Qiryat Tiv'on
Israel
 
 
How to convince others that you are tolerant and nonviolent: throw grenades
and firebombs, blow up schoolbusses and pizzerias, burn buildings,
decapitate those you can't convince, and in general, exhibit your
narrow-minded bloodthirstiness for all to see -- and tell them you're doing
it for God.

_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Andreas Kohl
Stan Goodman schrieb:

> On Mon, 10 Jul 2006 00:11:06 UTC, Andreas Kohl <[hidden email]> opined:
>> Hi,
>>
>> when viewing cyrillic websites (with encoding Windows-1251) the title
>> bar only displays question marks (????????) while the tabs show cyrillic
>> letters correctly.
>> This occurs in Firefox and Seamonkey.
>>
>> Regards,
>> Andreas Kohl
>
> I assume that this is because the title bar is governed by systems settings,

Which setting has to be changed to fix this behaviour?
I don't have russian NLV of OS/2 Warp - only german, english or french.

> while the tabs are under the control of the browser's settings notebook.
>

Thanks,
Andreas Kohl
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Alex Taylor
On Mon, 10 Jul 2006 16:25:48 +0200, Andreas Kohl <[hidden email]> wrote:
>>> when viewing cyrillic websites (with encoding Windows-1251) the title
>>> bar only displays question marks (????????) while the tabs show cyrillic
>>> letters correctly.
>>> This occurs in Firefox and Seamonkey.
>>
>> I assume that this is because the title bar is governed by systems settings,
>
> Which setting has to be changed to fix this behaviour?
> I don't have russian NLV of OS/2 Warp - only german, english or french.

Change your CODEPAGE (in CONFIG.SYS) to 878 (for Russian; alternatively
855 for Ukrainian or Belarussian, I think).

You can set it as your secondary codepage instead of your primary, if you
run Mozilla from a command prompt and do a 'chcp 878' first.  Or, if you
have FixPak XR_C004 or later (possibly XR_C003), then you can set the
Mozilla codepage to 878 from the 'Language' tab of the program object
properties.

--
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Michael Kaply-2
In reply to this post by Andreas Kohl
Andreas Kohl wrote:

> Stan Goodman schrieb:
>> On Mon, 10 Jul 2006 00:11:06 UTC, Andreas Kohl <[hidden email]> opined:
>>> Hi,
>>>
>>> when viewing cyrillic websites (with encoding Windows-1251) the title
>>> bar only displays question marks (????????) while the tabs show
>>> cyrillic letters correctly.
>>> This occurs in Firefox and Seamonkey.
>>>
>>> Regards,
>>> Andreas Kohl
>>
>> I assume that this is because the title bar is governed by systems
>> settings,
>
> Which setting has to be changed to fix this behaviour?
> I don't have russian NLV of OS/2 Warp - only german, english or french.
>
>> while the tabs are under the control of the browser's settings notebook.
>>
>
> Thanks,
> Andreas Kohl

The only way we could have ever done this was to ownerdraw the title bar
which is something we didn't want to do.

The titlebar can only display text in the native codepage of the system.

Mike
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Stan Goodman-2
On Mon, 10 Jul 2006 18:13:31 UTC, Michael Kaply <moc.mbi.su@ylpakm> opined:

> Andreas Kohl wrote:
> > Stan Goodman schrieb:
> >> On Mon, 10 Jul 2006 00:11:06 UTC, Andreas Kohl <[hidden email]> opined:
> >>> Hi,
> >>>
> >>> when viewing cyrillic websites (with encoding Windows-1251) the title
> >>> bar only displays question marks (????????) while the tabs show
> >>> cyrillic letters correctly.
> >>> This occurs in Firefox and Seamonkey.
> >>>
> >>> Regards,
> >>> Andreas Kohl
> >>
> >> I assume that this is because the title bar is governed by systems
> >> settings,
> >
> > Which setting has to be changed to fix this behaviour?
> > I don't have russian NLV of OS/2 Warp - only german, english or french.
> >
> >> while the tabs are under the control of the browser's settings notebook.
> >>
> >
> > Thanks,
> > Andreas Kohl
>
> The only way we could have ever done this was to ownerdraw the title bar
> which is something we didn't want to do.
>
> The titlebar can only display text in the native codepage of the system.
>
> Mike
 
It seems to be more complicated. I often see the "??????????" in the
titlebar on Hebrew pages, although my primary codepage is 862, which is
Hebrew.
 
--
Stan Goodman
Qiryat Tiv'on
Israel
 
 
How to convince others that you are tolerant and nonviolent: throw grenades
and firebombs, blow up schoolbusses and pizzerias, burn buildings,
decapitate those you can't convince, and in general, exhibit your
narrow-minded bloodthirstiness for all to see -- and tell them you're doing
it for God.

_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Stan Goodman-2
On Tue, 11 Jul 2006 21:11:00 UTC, "Peter Weilbacher"
<[hidden email]> opined:
> On Mon, 10 Jul 2006 21:11:10 UTC, "Stan Goodman" wrote:
>
> > It seems to be more complicated. I often see the "??????????" in the
> > titlebar on Hebrew pages, although my primary codepage is 862, which is
> > Hebrew.
>
> Does your titlebar font support Hebrew characters? If not, the ? are to
> be expected.
 
Lucida Sans Unicode.
 
--
Stan Goodman
Qiryat Tiv'on
Israel
 
 
How to convince others that you are tolerant and nonviolent: throw grenades
and firebombs, blow up schoolbusses and pizzerias, burn buildings,
decapitate those you can't convince, and in general, exhibit your
narrow-minded bloodthirstiness for all to see -- and tell them you're doing
it for God.

_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Michael Kaply-2
Peter Weilbacher wrote:

> On Tue, 11 Jul 2006 23:13:13 UTC, "Stan Goodman" wrote:
>
>> On Tue, 11 Jul 2006 21:11:00 UTC, "Peter Weilbacher"
>> <[hidden email]> opined:
>>> On Mon, 10 Jul 2006 21:11:10 UTC, "Stan Goodman" wrote:
>>>
>>>> It seems to be more complicated. I often see the "??????????" in the
>>>> titlebar on Hebrew pages, although my primary codepage is 862, which is
>>>> Hebrew.
>>> Does your titlebar font support Hebrew characters? If not, the ? are to
>>> be expected.
>>  
>> Lucida Sans Unicode.
>
> Hmm, it shows that I know too little about PM programming because I
> don't even know what to look for the in codebase to investigate why it
> doesn't work.

The code involved in this is here:

http://lxr.mozilla.org/seamonkey/source/widget/src/os2/nsWindow.cpp#3653

Basically we get a unicode string from Mozilla and do a
WideCharToMultibyte to convert it to the native codepage.

That's implemented here:

http://lxr.mozilla.org/seamonkey/source/gfx/src/os2/nsOS2Uni.cpp#139

In the title bar case, we pass in a codepage of 0 which hits this code:

http://lxr.mozilla.org/seamonkey/source/gfx/src/os2/nsOS2Uni.cpp#92

  92         if (aCodePage == 0) {
  93           nsCOMPtr<nsIPlatformCharset>
  94
plat(do_GetService(NS_PLATFORMCHARSET_CONTRACTID, &rv));
  95           if (NS_SUCCEEDED(rv)) {
  96             plat->GetCharset(kPlatformCharsetSel_FileName, charset);
  97           } else {
  98             // default to IBM850 if this should fail
  99             charset = "IBM850";
100           }
101           convname = charset.get();
102         } else {
103           convname = gConverterInfo[i].mConvName;
104         }

Which gets the system code page using this code:

http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsOS2Charset.cpp#148

I'm wondering if somehow mCharset isn't set when we hit this code?

http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsOS2Charset.cpp#148

Need to do some debugging.


Mike
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Peter Weilbacher
Michael Kaply wrote:

> The code involved in this is here:
>
> http://lxr.mozilla.org/seamonkey/source/widget/src/os2/nsWindow.cpp#3653
>
> Basically we get a unicode string from Mozilla and do a
> WideCharToMultibyte to convert it to the native codepage.
>
> That's implemented here:
>
> http://lxr.mozilla.org/seamonkey/source/gfx/src/os2/nsOS2Uni.cpp#139
>
> In the title bar case, we pass in a codepage of 0 which hits this code:
>
> http://lxr.mozilla.org/seamonkey/source/gfx/src/os2/nsOS2Uni.cpp#92
>
>  92         if (aCodePage == 0) {
>  93           nsCOMPtr<nsIPlatformCharset>
>  94                       plat(do_GetService(NS_PLATFORMCHARSET_CONTRACTID, &rv));
>  95           if (NS_SUCCEEDED(rv)) {
>  96             plat->GetCharset(kPlatformCharsetSel_FileName, charset);
>  97           } else {
>  98             // default to IBM850 if this should fail
>  99             charset = "IBM850";
> 100           }
> 101           convname = charset.get();
> 102         } else {
> 103           convname = gConverterInfo[i].mConvName;
> 104         }
>
> Which gets the system code page using this code:
>
> http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsOS2Charset.cpp#148
>
> I'm wondering if somehow mCharset isn't set when we hit this code?

No, it always gets set in the nsPlatformCharset constructor via
MapToCharset[1]. cp862 is contained in os2charset.properties, just as
cp850, so that should work. I don't want to mess up my system, so I
hesitate to really set it to use cp862...

I never saw this direct assigment
   charset = "IBM850"
in any code using XPCOM strings before but that should not cause the
failure.

[1] So I don't understand the comment
  //delay loading os2charset.properties bundle if possible
(in MapToCharset at nsOS2Charset.cpp line 101) because that already
happens in the constructor. Perhaps I should try removing it and the
first two hardcoded codepage cases in that function.
--
Please      Unofficial builds: http://weilbacher.org/Mozilla/builds.html
reply in        (reload the _frame_ for the current version of the page)
newsgroup
    Steve's Warpzilla Tips: http://www.os2bbs.com/os2news/Warpzilla.html
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Michael Kaply-2
Peter Weilbacher wrote:
> [1] So I don't understand the comment
>   //delay loading os2charset.properties bundle if possible
> (in MapToCharset at nsOS2Charset.cpp line 101) because that already
> happens in the constructor. Perhaps I should try removing it and the
> first two hardcoded codepage cases in that function.

Yeah, that doesn't really make sense. In the old days, we hardcoded the
most "common" codepages to avoid the call to load the bundle, but
clearly nsOS2Charset.cpp loads the bundle...
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Andreas Kohl
In reply to this post by Alex Taylor
Alex Taylor schrieb:

> On Mon, 10 Jul 2006 16:25:48 +0200, Andreas Kohl <[hidden email]> wrote:
>>>> when viewing cyrillic websites (with encoding Windows-1251) the title
>>>> bar only displays question marks (????????) while the tabs show cyrillic
>>>> letters correctly.
>>>> This occurs in Firefox and Seamonkey.
>>> I assume that this is because the title bar is governed by systems settings,
>> Which setting has to be changed to fix this behaviour?
>> I don't have russian NLV of OS/2 Warp - only german, english or french.
>
> Change your CODEPAGE (in CONFIG.SYS) to 878 (for Russian; alternatively
> 855 for Ukrainian or Belarussian, I think).
>

Russian codepage seems to be 866.

> You can set it as your secondary codepage instead of your primary, if you

Yes I can, but it doesn't work.
Then I got Error SYS1196: parameter 8xx is not acceptable for CODEPAGE
statement.

> run Mozilla from a command prompt and do a 'chcp 878' first.  Or, if you
> have FixPak XR_C004 or later (possibly XR_C003), then you can set the
> Mozilla codepage to 878 from the 'Language' tab of the program object
> properties.
>

And I can only select between 0 and 0.

Regards,
Andreas Kohl
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Alex Taylor
On Tue, 18 Jul 2006 20:41:52 +0200, Andreas Kohl <[hidden email]> wrote:
>>> I don't have russian NLV of OS/2 Warp - only german, english or french.
>>
>> Change your CODEPAGE (in CONFIG.SYS) to 878 (for Russian; alternatively
>> 855 for Ukrainian or Belarussian, I think).
>
> Russian codepage seems to be 866.

Yes, that's my mistake -- 866 is the CONFIG.SYS codepage, not 878 (which
is only used for converting Internet messages and the like).


> Yes I can, but it doesn't work.
> Then I got Error SYS1196: parameter 8xx is not acceptable for CODEPAGE
> statement.

CODEPAGE=850,866 should work, although it may depend on the country code
passed to COUNTRY.SYS as well (I've never been very sure about that).


>> run Mozilla from a command prompt and do a 'chcp 878' first.  Or, if you
>> have FixPak XR_C004 or later (possibly XR_C003), then you can set the
>> Mozilla codepage to 878 from the 'Language' tab of the program object
>> properties.
>
> And I can only select between 0 and 0.

Presumably because of the CODEPAGE setting error on bootup.

--
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: Cyrillic problems

Peter Weilbacher
In reply to this post by Michael Kaply-2
On Mon, 17 Jul 2006 15:45:02 UTC, Michael Kaply wrote:

> Peter Weilbacher wrote:
> > [1] So I don't understand the comment
> >   //delay loading os2charset.properties bundle if possible
> > (in MapToCharset at nsOS2Charset.cpp line 101) because that already
> > happens in the constructor. Perhaps I should try removing it and the
> > first two hardcoded codepage cases in that function.
>
> Yeah, that doesn't really make sense. In the old days, we hardcoded the
> most "common" codepages to avoid the call to load the bundle, but
> clearly nsOS2Charset.cpp loads the bundle...

I filed https://bugzilla.mozilla.org/show_bug.cgi?id=347503 now.
--
Please      Unofficial builds: http://weilbacher.org/Mozilla/builds.html
reply in        (reload the _frame_ for the current version of the page)
newsgroup
    Steve's Warpzilla Tips: http://www.os2bbs.com/os2news/Warpzilla.html
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2