View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri Jan 23, 2015 12:05 pm Post subject: |
|
|
This issue is proving to be very tricky. Clearly the Microsoft edit box used for input is able to receive Chinese characters so it must be working in UNICODE mode. But my attempts to retrieve the characters via a call to GetWindowTextW is not working. Also IsWindowUnicode is returning false which is clearly wrong.
The best I can do at the moment is to copy the text to the clipboard and then I can retrieve it from there.
One way forward may be to get something working using only the API and not using ClearWin+ at all, to see if that provided any clues but that would be a significant task right now.
I will take a look at the problem with the German characters in a menu to see if any progress can be made there. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri Jan 23, 2015 1:09 pm Post subject: |
|
|
The first issue in the initial post on this thread has now been fixed for the next release (German character in menu name).
Do you have a short sample for the second item in the initial post? |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Fri Jan 23, 2015 4:11 pm Post subject: |
|
|
Paul,
we have written the following code concerning the second issue of our initial post:
Code: |
winapp
program main
integer*4 i,winio@
character(len=20) txt
common /COMTXT/ txt
C_EXTERNAL ENABLE_UTF8@ '__enable_utf8' (VAL)
call ENABLE_UTF8@(1)
txt = 'hallo 先生'
C before using first winio call all utf8 outputs are wrong
write(*,'(A)') txt !+ wrong output of characters
write(*,'(A)') txt !+ wrong output of characters
i = winio@('%fn[Arial Unicode MS]&')
write(*,'(A)') txt !+ correct output of characters
i = winio@('%`rs%nl&', txt) !+ correct output of characters
i = winio@('%rs', txt) !+ !+ wrong output of characters (thats strange! new bug?)
end
|
Please have a look at web link
http://www11.pic-upload.de/23.01.15/dkq36vowrspd.jpg
for a picture corresponding to the executable compile from that code.
It turned out that we found another problem. If buffer txt has been set to a string containing Chinese characters, then the output of the edit field [%rs] is wrong. Please see the comments in the example above.
Regards,
Diemar |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Sat Jan 24, 2015 12:03 pm Post subject: |
|
|
The main bug in the last sample above has now been fixed for the next release.
The "new bug" referred to above is in fact a different manifestation of the remaining outstanding bug on this thread - Chinese characters are not copied correctly from a %rs edit to the user's character buffer. Hence they are not transmitted to another control that uses the same buffer. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Jan 27, 2015 10:35 am Post subject: |
|
|
All of the outstanding bugs described on this thread have now been fixed for the next release. However, for the moment, the problem with Chinese characters and %rs has been fixed by disabling user popup menus in this context. So for the time being you will not be able to attach a user popup menu to a %rs edit box that has UTF8 enabled. However you should still get the standard Microsoft popup menu for an Edit control and this provides options for right to left reading order etc. |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Fri Jan 30, 2015 9:45 am Post subject: |
|
|
Paul,
thanks, we tested with the new salflibc dll and the problems we mentioned in this post have been tested ok from our point of view.
Regards,
Dietmar |
|
Back to top |
|
|
|