Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting foreign accents
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxExpress
Miscellaneous
Thread ID:
01648083
Message ID:
01648107
Views:
58
*!*chrtran() vfp function 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.
*!*syntaxe: CHRTRAN(cSearchedExpression, cSearchExpression, cReplacementExpression)
*!*	 

local m.myvar
text to m.myvar noshow  &&this is a french text with acents,^,...specific chars (from http://www.lorem-accents.com/)
Tellus donec pulvîar fancibüs à classé pésuéré arcu mattis, aliquét alèquam habitant juséo convallis tùrpus néc, 
adipiscing enim !
énis nostra fuscé. Fringlilia vestibulum sed famès nostré morbi mattis ut, cubliâ classé curae metus conubia 
cél litoré, primis donéc dictum aliquet pulvîar et orci interdum.
endtext
messagebox(m.myvar,0+32+4096,"first string version")
local mynewVar
m.myNewvar=CHRTRAN(m.myvar, "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ","AAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy")

messagebox(m.myNewvar,0+32+4096,"in clipboard")  &&can paste anywhere from the clipboard and see there is no specific french letters
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform