forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UTF-8 Problems
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6457
Location: Salford, UK

PostPosted: Fri Jan 23, 2015 12:05 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6457
Location: Salford, UK

PostPosted: Fri Jan 23, 2015 1:09 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 239

PostPosted: Fri Jan 23, 2015 4:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6457
Location: Salford, UK

PostPosted: Sat Jan 24, 2015 12:03 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6457
Location: Salford, UK

PostPosted: Tue Jan 27, 2015 10:35 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 239

PostPosted: Fri Jan 30, 2015 9:45 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group