Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foreign accents
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01648201
Message ID:
01648267
Views:
30
>I think that the problem I am having with accents is that the accent in question is not a valid accent
>
>If I copy and paste the field it look like this Paris La D‚fense I dont know what character the 2nd letter of Defense is - if anyone can help I can email the info on a spreadsheet - I dont think this charecter is included in the conversion tables you have all so kindly shown me


why don't you store that field in a variable and analyze it:


x1=[La D‚fense]


FOR I = 1 TO LEN(x1)
? SUBSTR(x1,I,1) , ASC(SUBSTR(x1,I,1))
ENDFOR


ten you see that the fifth cagracter is an accented 'e' as in chr(130)

therefor you chartran() function should work
incase you don't understand chrtran look it up in the helpfile:


Replaces each character in a character expression that matches a character in a second character expression with the corresponding character in a third character expression.



CHRTRAN(cSearchedExpression, cSearchExpression, cReplacementExpression)



Parameters
cSearchedExpression
Specifies the expression in which CHRTRAN( ) replaces characters.

cSearchExpression
Specifies the expression containing the characters CHRTRAN( ) looks for in cSearchedExpression.

cReplacementExpression
Specifies the expression containing the replacement characters.

If a character in cSearchExpression is found in cSearchedExpression, the character in cSearchedExpression is replaced by a character from cReplacementExpression that's in the same position in cReplacementExpression as the respective character in cSearchExpression.

If cReplacementExpression has fewer characters than cSearchExpression, the additional characters in cSearchExpression are deleted from cSearchedExpression. If cReplacementExpression has more characters than cSearchExpression, the additional characters in cReplacementExpression are ignored.

Collapse imageReturn Value
Character

Collapse imageRemarks
CHRTRAN( ) translates the character expression cSearchedExpression using the translation expressions cSearchExpression and cReplacementExpression and returns the resulting character string.

Collapse imageExample
CopyCode imageCopy Code
? CHRTRAN('ABCDEF', 'ACE', 'XYZ') && Displays XBYDZF

? CHRTRAN('ABCD', 'ABC', 'YZ') && Displays YZD

? CHRTRAN('ABCDEF', 'ACE', 'XYZQRST') && Displays XBYDZF
Peter Cortiel
Previous
Reply
Map
View

Click here to load this message in the networking platform