Desktop

StrConv()

This function, added in version 3.0b, performs an assortment of conversions between different character sets. Among other things, it can be used in place of LOWER() and UPPER(). The parts we're able to test without having double-byte data at hand seem to work.

Usage

cConvertedString = STRCONV( cOriginalString, nConversionType                              [, nLocaleId ] )

Parameter

Value

Meaning

cOriginalString

Character

The data you want to convert.

nConversionType

1

Change single-byte to double-byte.

2

Change double-byte to single-byte.

3, 4

Change between the two Japanese forms.

5

Change double-byte to Unicode.

6

Change Unicode to double-byte.

7

Change to appropriate lowercase for nLocaleId.

8

Change to appropriate uppercase for nLocaleId.

nLocaleId

Numeric

Specifies the locale for lowercase and uppercase conversion.

cConvertedString

Character

The original string after the specified conversion has been performed.


The nLocaleId parameter was added in VFP 6. In English, there's a one-to-one correspondence between lowercase and uppercase letters. However, in some languages, where some characters take accents, it's not that simple. Specifying the locale you're interested in makes it possible to handle these cases. Unfortunately, it doesn't look as though you can simply pass any locale ID to see how your string would be converted—your version of Windows has to support that locale.

Example

? STRCONV("This is a test", 7)  && Returns "this is a test"

See Also

Double-Byte Character Sets, Lower(), Upper()


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net