Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This doesn't translate...
Message
 
To
21/08/2008 14:57:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01340903
Message ID:
01340915
Views:
7
Hi Lucien,

in VFP this would mainly depend on the codepage and the current collate sequence.

To avoid any impact of collate, the easiest solution is to only use the == operator to compare strings. This always happens without any collate sequence. Testing for inequality would be NOT == instead of !=, <> or #.

The code page is a bit more difficult to tackle. Code page conversion find place when the source and the destination code page are not equal. In you case there can be up to three code pages involved: system, table and code.

The system code page depends on either the Windows configuration or the CODEPAGE= setting in the config.fpw. Use CPCURRENT() to find this one out.

The code page of the table is stored in the table header. You can use CPDBF() to read the code page. The easiest way to avoid any code page issues is to use any of the (binary) field types which corresponds to including the field into SET NOCPTRANS. To prevent code page translation, you could also set the table's codepage to 0. CPZERO.PRG will do this.

The code code page is specified in the project manager on the project info dialog. Every program can have a different code page. These code pages are used to translate literals in your code (strings in quotation marks) into the current system codepage.
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform