Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting rid of accents
Message
From
04/12/2001 08:02:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
04/12/2001 07:52:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00588985
Message ID:
00589160
Views:
29
european.mem contains all the definitions required for chrtran(). It is included with VFP.
restore from home() + "european.mem"
? chrtran("aeiouáéíóú", european, euroansi)
HTH, Hilmar.

>>>Hi All,
>>>
>>>Is there a function that will convert "É, Ê or È" into "E"? Since most of our employees are French. They have lots of accents in their names. In our main program that handles them this is allowed. But we need to export all the names into a SDF format. And import into a program that can't handle accents.
>>>
>>
>>You can use CHRTRAN() function
? CHRTRAN(lcStr, "ÉÊÈ", "EEE")
>
>Hi Sergey,
>
>This is what I've been doing:
>STRTRAN(STRTRAN(STRTRAN(STRTRAN(UPPER(PADR(ALLT(SUBSTR(export_cursor.last_name, 1, 22)) + "," + ALLT(export_cursor.first_name), 24, " ")), "É", "E"), "Ë", "E"), "È", "E"), "Ç", "C")
>
>But this still only covers what I've seen in the database. I'd like to do something that would cover all accents. There are lots more that I didn't cover. But as yet they haven't been used.
>
>Mike
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform