Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I get ???? when copying russian text into textfield

Status
Not open for further replies.

vanni75

Programmer
Nov 27, 2002
29
BE
Hi,

I have a table with codepage 1251 . The Foxpro codepage is set too 1251 in the config.fpw and colate sequence is set to russian. The windows is set to western europe (default) and cyrillic. When I copy text form an excelsheet into the tablefield it displays ??????? ???? .

Can somebody help me ?

thx
 
VFP controls don't support Unicode, sorry.
 
However, if you use the "Microsoft Forms" activeX controls, they do support unicode. VFP can then store and retrieve the unicode in tables, etc, and manipulate it with STRCONV() and like functions.

Go to Tools --> Options --> Controls, and select "ActiveX Controls", then check all the "Microsoft Forms ..." controls in the list. CLose the Options dialog.

Now, when editing a form, click the "View Classes" button on the "Form Designer" toolbar, and choose "ActiveX Controls" Put the "Microsoft Forms 2.0 Textbox" on the form, then run the form and try pasting the russian into the textbox... and it'll work!
 
vanni75,

What Windows do you use?

I don't work with Russian text in tables now, but I was able to store Russian text in tables in Windows'98 without using ActiveX controls or explicitly setting code page, just by switching to Russian keyboard layout, choosing a Cyrillic font and keying in or copying in the text right to the table fields. I recently got a new machine with Windows XP, and just now (while reading your post) noticed the fenomenon you describe. It perfectly capable of using Russian in Excel and Word, but doesn't copy it over to VFP.

Stella
 
I use Windows 2000.

In the meanwhile I discovered the problem is much harder too solve. I've got some help from a russian programmer who told me this :

To provide Russian language in VFP it is required to
have config.fpw file with strings
codepage=1251
Also all tables must be created in this page, or current tables under
1252 must be coppied into 1251 and all charater fields be converted through
cpconvert(1252,1251,..) function
Same trick should be done with scx (forms) and vcx (classes) files

If you have enter the data from the forms, also do the following thing
open all scx files like tables, make copy to newname.scx as 1251
rename nename.scx to old form name and not it will not destroy symbols

Yes, you need to move all scx,vcx,frx files into 1251 to make it correctly working in Russia
Without doing this you see old Russian text in the correct way, but
destroyed after save into table. Not all, but 8 Russians letters.
Config.fpw near exe file with codepage=1251 is also clue thing.
If you move the project to client -server, few other things should be done


****

this was his answer ... but what has to be doen for client-server I don't know yet ? Anybody may know this please help me?
 
Hi!
Although Windows 2000 supports Unicode only in VFP 8.0 you can use FontCharSet for proper displaying russian symbols.
In case of VFP 8.0 you must set for input-type controls FontCharSet=204 (for Western default of W2K).
In case you use earlier versions you must use the special fonts like ER Bukinist.
I'll send you this one.

Juri
(russian programmer)
 
2 vanni75
Send me please your e-mail address to jsshare@hot.ee
 
Mike,
really?

Can You provide any example when you use standard windows fons for correct display of the russian symbols, including proper display on controls such as Command buttons. labels etc? (For versions earlier than 8.0)

 
One else thing.

I don't why, but when I use VFP 8.0 at W2K and try to change font's script to "cyrillic" for browse window or when I in edit mode and try to write comment in Russian, it option is unavailable.
 
Mike's right, you don't need Unicode (Russian has been around since long before Unicode ;)... but Unicode seems to me to make everything much easier:

I thought that the ActiveX controls I mentioned would make the whole thing easier, but in experimentation now, it seems the VFP (v6) translates from unicode to non-unicode on trying to access the properties of the controls... anything that isn't in the ASCII char set gets converted to "?"... so it doesn't seem to offer a solution.
 
Thanks for link. I know it well because 8 years develop the international applications. In common case minimum in 3 languages - english, russian and estonian. (I mean here user interface, and in my applicaiotion user can change language on fly without any problem by clicking button on special "language bar" on form).
But, does it ethic to change localization on client's machine?
I don't think so.
Now with VFP 8.0 I'm quite happy with international applications.

Juri Shutenko
Municipality of Maardu, Estonia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top