Problem with PowerBuilder 6-based app

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

Hello to all;
I'm looking for somebody who has tried powerbuilder 6-based apps in the newest
versions of Wine (currently I'm using v0.9.57 in Debian Etch).
Well, the situation is:
I want to use a Sybase-based database management system, using Sql Anywhere 10
as the DB server and a powerbuilder-based app as the client. So I get the
Anywhere 10 version for GNU/Linux, configure it and its ODBC interface, and
now I can access my Sybase db's from Linux and Wine (I can even use Winsql to
access the server).

But the real problem is the powerbuilder-based client app. I didn't compile it
(just got it already compiled, with some DLLs).
The app starts, connects to the server, and opens the DB just fine (I think),
but some parts of the app doesn't work:
- Some text boxes (that are meant for input numbers - keys) doesn't allow me
to write numbers. When I try to input the numbers, the text boxes shows the
string ".+" or something similar.
- The same thing happens with some list boxes and combo boxes.

I must note that I didn't test the app very much. Surely there are other
errors, but for now, I'm trying to fix these.

I wanted to include a WINEDEBUG output, but for Wine the app seems to work
fine: without "WINEDEBUG=+all" I don't get even "FixMe" nor "Warning"
messages... And, of course, the output of "WINEDEBUG=+all" will be VERY
big :-)

So, thanks to all, and I will wait for any advice. Any extra information you
need, just tell me.

Hugo Segovia
Alan McKinnon

Problem with PowerBuilder 6-based app

Post by Alan McKinnon »

On Saturday 15 March 2008, Hugo Cardozo wrote:
Hello to all;
I'm looking for somebody who has tried powerbuilder 6-based apps in
the newest versions of Wine (currently I'm using v0.9.57 in Debian
Etch). Well, the situation is:
I want to use a Sybase-based database management system, using Sql
Anywhere 10 as the DB server and a powerbuilder-based app as the
client. So I get the Anywhere 10 version for GNU/Linux, configure it
and its ODBC interface, and now I can access my Sybase db's from
Linux and Wine (I can even use Winsql to access the server).
How lucky for you, I used to work for Sybase :-) And my gf (who is
sitting right next to me right now) also used to work for Sybase and
uses Sybase products every day of her working life. AND we still have
all out old contacts AND an easy way to get my hands on any Sybase
software I might like to test....

I do recall getting PB to run on Wine was a major ball-ache. I managed
it once with tons of native dlls (enough to give the Wine devs have a
heart attack) but it was possible.

Depending on how critical your needs are and how much time you want to
invest in getting this app running, I'd be happy to help out. Post away
with details
But the real problem is the powerbuilder-based client app. I didn't
compile it (just got it already compiled, with some DLLs).
The app starts, connects to the server, and opens the DB just fine (I
think), but some parts of the app doesn't work:
- Some text boxes (that are meant for input numbers - keys) doesn't
allow me to write numbers. When I try to input the numbers, the text
boxes shows the string ".+" or something similar.
- The same thing happens with some list boxes and combo boxes.

I must note that I didn't test the app very much. Surely there are
other errors, but for now, I'm trying to fix these.

I wanted to include a WINEDEBUG output, but for Wine the app seems to
work fine: without "WINEDEBUG=+all" I don't get even "FixMe" nor
"Warning" messages... And, of course, the output of "WINEDEBUG=+all"
will be VERY big :-)

So, thanks to all, and I will wait for any advice. Any extra
information you need, just tell me.

Hugo Segovia

--
Alan McKinnon
alan dot mckinnon at gmail dot com
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

El Sábado, 15 de Marzo de 2008 10:27, Alan McKinnon escribió:
How lucky for you, I used to work for Sybase :-) And my gf (who is
sitting right next to me right now) also used to work for Sybase and
uses Sybase products every day of her working life. AND we still have
all out old contacts AND an easy way to get my hands on any Sybase
software I might like to test....
Thanks for that :-)

And, I will put the app, its DLLs and the database in my website for download
shortly, so you can test it yourself. I will let you now soon :-)

Hugo Segovia
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

El Sábado, 15 de Marzo de 2008 10:27, Alan McKinnon escribió:
I do recall getting PB to run on Wine was a major ball-ache. I managed
it once with tons of native dlls (enough to give the Wine devs have a
heart attack) but it was possible.
Well, I don't want to use PowerBuilder itself, I want to use an application
which was created and compiled with PowerBuilder 6.
By the way, I cannot get PB, nor the source code of the app :(
Depending on how critical your needs are and how much time you want to
invest in getting this app running, I'd be happy to help out. Post away
with details
About that details you want: without using the "WINEDEBUG=+all" env var, I
don't get any error/warning/fixme/anything messages. And using "+all" I got a
10 MB report! Maybe send it to the mailing list would not be a good idea :)

So, how can I give you the details you want?

Hugo Segovia
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

Hello to all;
I'm looking for somebody who has tried powerbuilder 6-based apps in
the newest versions of Wine (currently I'm using v0.9.57 in Debian
Etch)....
Hello again,
I put a tarball with the application and its DLLs, along with a test database
and other (maybe) helpful files in this location:
www.coopcacec.com.py/webcacec/dbcoop

Waiting for your advices

Hugo S.
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

I put a tarball with the application and its DLLs, along with a test
database
and other (maybe) helpful files in this location:
www.coopcacec.com.py/webcacec/dbcoop
I didn't gave my webserver access to the "dbcoop.bz2" file, my fault :). Now
it is fixed, you can download it.

Hugo S.
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

El Lunes, 17 de Marzo de 2008 11:48, Dan Kegel escribió:
still can't access

On Mon, Mar 17, 2008 at 8:44 AM, Hugo Cardozo <[email protected]> wrote:
I put a tarball with the application and its DLLs, along with a test
database
and other (maybe) helpful files in this location:
www.coopcacec.com.py/webcacec/dbcoop
Another fix, try again.
Thanks :)

Hugo S.
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

I put a tarball with the application and its DLLs, along with a test
database
and other (maybe) helpful files in this location:
www.coopcacec.com.py/webcacec/dbcoop
Now I put too a snapshot of the running app.

Hugo S.
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

I put a tarball with the application and its DLLs, along with a test
database
and other (maybe) helpful files in this location:
www.coopcacec.com.py/webcacec/dbcoop
I put another snapshot. This one doesn't show the error, but another issue,
probably related.

Hugo S.
Alan McKinnon

Problem with PowerBuilder 6-based app

Post by Alan McKinnon »

On Monday 17 March 2008, Hugo Cardozo wrote:
I put a tarball with the application and its DLLs, along with a
test
database
and other (maybe) helpful files in this location:
www.coopcacec.com.py/webcacec/dbcoop
I put another snapshot. This one doesn't show the error, but another
issue, probably related.
I've downloaded the various files, and tomorrow when I have some time to
spare, I'll have a look at it.

--
Alan McKinnon
alan dot mckinnon at gmail dot com
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

I'm looking for somebody who has tried powerbuilder 6-based apps...
Hi again;
Looking for Unicode issues (as I'm using Debian Etch with UTF-8), I found the
bug 7512 in WineHQ bugzilla (about Unicode text scrambled in comboboxes). As
you can see in the snapshot www.coopcacec.com.py/webcacec/dbcoop/snap3.png,
the header of the message box do not display well numbers. Maybe that bug is
related to my problem...

Still searching ;)

Hugo S.
Geoff Streeter

Problem with PowerBuilder 6-based app

Post by Geoff Streeter »

Hugo Cardozo wrote:
I'm looking for somebody who has tried powerbuilder 6-based apps...
Hi again;
Looking for Unicode issues (as I'm using Debian Etch with UTF-8), I found the
bug 7512 in WineHQ bugzilla (about Unicode text scrambled in comboboxes). As
you can see in the snapshot www.coopcacec.com.py/webcacec/dbcoop/snap3.png,
the header of the message box do not display well numbers. Maybe that bug is
related to my problem...

Still searching ;)

Hugo S.


A windows unicode application will be using UTF16. Although, unless you
are using some extremely unusual characters, that is the same as UCS2.
So the application is sending two byte unicode characters to your combo box.

At some point wine will need to convert those in order to show them in
its own version of a combo box. It is that conversion that will require
translation from UTF16 to UTF8. The big difference between UCS2 and UTF8
is that UCS2 is indexable. If you want to address the 16th character
then it is at the 32nd byte. With UTF8 you have to walk along the whole
string counting characters until you reach the 16th. Of course the same
lack of indexability also applies to UTF16 but few users would notice an
error induced by treating UTF16 as UCS2.

The other issue is whether the font used actually has all the characters
you are trying to display.

Geoff
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

El Martes, 18 de Marzo de 2008 10:55, Geoff Streeter escribió:
A windows unicode application will be using UTF16. Although, unless you
are using some extremely unusual characters, that is the same as UCS2.
So the application is sending two byte unicode characters to your combo
box.

At some point wine will need to convert those in order to show them in
its own version of a combo box. It is that conversion that will require
translation from UTF16 to UTF8. The big difference between UCS2 and UTF8
is that UCS2 is indexable. If you want to address the 16th character
then it is at the 32nd byte. With UTF8 you have to walk along the whole
string counting characters until you reach the 16th. Of course the same
lack of indexability also applies to UTF16 but few users would notice an
error induced by treating UTF16 as UCS2.
So, what can I do about that? AFAIK, GNU/Linux don't handle UTF-16.
The other issue is whether the font used actually has all the characters
you are trying to display.
Maybe this is not the problem. I used "winetricks allfonts" to install windows
fonts, but I keep getting the same output.

And, FYI, I tried the test programs in the bug 7512 page
(UnicodeTest_GetWindowLong{A,W}.exe), and the two worked fine...

Hugo S.
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

I'm looking for somebody who has tried powerbuilder 6-based apps...
I used the "WINEDEBUG=+nls" param when executing the app. And I included the
output in this e-mail.
It isn't the output of the whole program, just of the part when I get the
error of my first snapshot.

Hugo S.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine_nls_out.txt.gz
Type: application/x-gzip
Size: 1670 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-us ... chment.bin
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

I used the "WINEDEBUG=+nls" param when executing the app. And I included the
output in this e-mail.
It isn't the output of the whole program, just of the part when I get the
error of my first snapshot.
First, sorry for make this thread so long :)
Second: I forget to note that in the output I included, when I input the
number (number one, in this case), the app received it correctly ( I think
so, because of this output:

trace:nls:MultiByteToWideChar cp 0 "1" -> L"1", ret = 1
trace:nls:MultiByteToWideChar cp 0 "dwprop\x00" -> L"dwprop\0000", ret = 7
trace:nls:MultiByteToWideChar cp 0 "MAIN\x00" -> L"MAIN\0000", ret = 5
trace:nls:WideCharToMultiByte cp 0 L"1" -> (null), ret = 1

trace:nls:MultiByteToWideChar cp 0 "MAIN\x00" -> L"MAIN\0000", ret = 5
trace:nls:MultiByteToWideChar cp 0 "%+#23.15e\x00" -> (null), ret = 10
trace:nls:MultiByteToWideChar cp 0 "%+#23.15e\x00" -> L"%+#23.15e\0000", ret
= 10
trace:nls:WideCharToMultiByte cp 0 L"\0000" -> (null), ret = 1
trace:nls:WideCharToMultiByte cp 0 L"\0000" -> "\x00", ret = 1
trace:nls:MultiByteToWideChar cp 0 "dwprop\x00" -> L"dwprop\0000", ret = 7
trace:nls:MultiByteToWideChar cp 0 "MAIN\x00" -> L"MAIN\0000", ret = 5
trace:nls:MultiByteToWideChar cp 0 "+\x00" -> (null), ret = 2
trace:nls:MultiByteToWideChar cp 0 "+\x00" -> L"+\0000", ret = 2
trace:nls:MultiByteToWideChar cp 0 "MAIN\x00" -> L"MAIN\0000", ret = 5
trace:nls:MultiByteToWideChar cp 0 "dwprop\x00" -> L"dwprop\0000", ret = 7
trace:nls:MultiByteToWideChar cp 0 "MAIN\x00" -> L"MAIN\0000", ret = 5
trace:nls:MultiByteToWideChar cp 0 "dwprop\x00" -> L"dwprop\0000", ret = 7
trace:nls:MultiByteToWideChar cp 0 "MAIN\x00" -> L"MAIN\0000", ret = 5
trace:nls:MultiByteToWideChar cp 0 "dwprop\x00" -> L"dwprop\0000", ret = 7
trace:nls:MultiByteToWideChar cp 0 "MAIN\x00" -> L"MAIN\0000", ret = 5


and then the app shows the wrong char:

trace:nls:WideCharToMultiByte cp 0 L"+" -> (null), ret = 1
trace:nls:MultiByteToWideChar cp 0 "dwprop\x00" -> L"dwprop\0000", ret = 7
trace:nls:MultiByteToWideChar cp 0 "MAIN\x00" -> L"MAIN\0000", ret = 5
trace:nls:WideCharToMultiByte cp 0 L"+\0000" -> "+\x00", ret = 2

Why the function "MultiByteToWideChar" receives "1" and "WideCharToMultiByte"
returns "+"?

Hugo S.
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

Why the function "MultiByteToWideChar" receives "1"
and "WideCharToMultiByte" returns "+"?
For now, I don't know where to look for... Anybody has an idea?

Hugo S.
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

Hi to all again :);
I'm looking for somebody who has tried powerbuilder 6-based apps in
the newest versions of Wine (currently I'm using v0.9.57 in Debian
Etch). Well, the situation is:
I want to use a Sybase-based database management system, using Sql
Anywhere 10 as the DB server and a powerbuilder-based app as the
client. So I get the Anywhere 10 version for GNU/Linux, configure it
and its ODBC interface, and now I can access my Sybase db's from
Linux and Wine (I can even use Winsql to access the server).

But the real problem is the powerbuilder-based client app. I didn't
compile it (just got it already compiled, with some DLLs).
The app starts, connects to the server, and opens the DB just fine (I
think), but some parts of the app doesn't work:
 - Some text boxes (that are meant for input numbers - keys) doesn't
allow me to write numbers. When I try to input the numbers, the text
boxes shows the string ".+" or something similar.
 - The same thing happens with some list boxes and combo boxes.
I was debugging my problematic application with some local PowerBuilder-guru,
and we found that the problem only affects some text/list/combo boxes, the
ones that are meant to input "only" numbers (controls with some kind
of "numeric only" attribute...)

So we make a program just to test that, without database connection; and we
got the error again.

So, we think that the problem is in the app, not in Wine...

If anybody want to try our test app, it can be downloaded from
www.coopcacec.com.py/dbcooop/. There are some instructions for using that
program and a new snapshot of the program, too.

Thanks

Hugo S.
Dan Kegel

Problem with PowerBuilder 6-based app

Post by Dan Kegel »

I tried the new version of your test from
http://www.coopcacec.com.py/webcacec/dbcoop/
and confirm that it works in Windows but not in
Wine. I also verified that doing
wget http://kegel.com/wine/winetricks
sh winetricks vcrun6
and setting msvcrt to native worked around the
problem. Is that good enough for you for now?

This is .http://bugs.winehq.org/show_bug.cgi?id=1789
and has been open for over four years.
The fact that a second powerbuilder user has
run into it raises its profile a bit.
Hugo Cardozo

Problem with PowerBuilder 6-based app

Post by Hugo Cardozo »

Hi!
I tried the new version of your test from
http://www.coopcacec.com.py/webcacec/dbcoop/
and confirm that it works in Windows but not in
Wine. I also verified that doing
wget http://kegel.com/wine/winetricks
sh winetricks vcrun6
and setting msvcrt to native worked around the
problem. Is that good enough for you for now?
Yes, very good! The application worked!
Now, it doesn't have any errors anymore! (for now...)
This is http://bugs.winehq.org/show_bug.cgi?id=1789
and has been open for over four years.
The fact that a second powerbuilder user has
run into it raises its profile a bit.
Well, my test app will be available for a while, if anybody wants to use it
for debugging. I will try to get the source code too :-)

So thanks a lot! I will stay on touch!

Hugo S.
Locked