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:
01648209
Views:
25
>>>>i reproduce your "desirata" in the code below.
>>>>when browsing the globalinx cursor you can see the first field (addfield) is accentued and the converted field (unaccentued).
>>>>the conversion is made by a cursor scan
>>>>in the first field you can put your "Paris la défense" or any accentued string.
>>>>
>>>>create cursor globalinx (addfield  c(150),unaccentued c(150))
>>>>insert into globalinx values("Tellus donec pulvîar fancibüs à classé pésuéré arcu mattis, aliquét alèquam habitant juséo convallis tùrpus néc,","")
>>>>insert into globalinx values("adipiscing enim !","")
>>>>insert into globalinx values("énis nostra fuscé. Fringlilia vestibulum sed famès nostré morbi mattis ut, cubliâ classé curae metus conubia","") 
>>>>insert into globalinx values("cél litoré, primis donéc dictum aliquet pulvîar et orci interdum.","")
>>>>SELECT globalinx
>>>>SCAN
>>>>repl unaccentued with CHRTRAN(addfield, "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ","AAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy")
>>>>endscan
>>>>brow
>>>>
>>>
>>>I am getting very confused my dbf file consists of about 1000 records and 20 fields of which 10 could have accents - I dont know what the accents are I just need to remove all accents from all of the 10 fields for all of the 1000 records - I dont understand your code - Is ther any other way you can explain i to me?
>>>
>>>Thanks
>>
>>Colin,
>>
>>That code is crystal clear. I think you don't want to even make an effort to understand it.
>
>
>Naomi I am trying to understand the code but obviously failing - I have jut run the code
>
>create cursor globalinx (addfield c(150),unaccentued c(150))
>insert into globalinx values("Tellus donec pulvîar fancibüs à classé pésuéré arcu mattis, aliquét alèquam habitant juséo convallis tùrpus néc,","")
>insert into globalinx values("adipiscing enim !","")
>insert into globalinx values("énis nostra fuscé. Fringlilia vestibulum sed famès nostré morbi mattis ut, cubliâ classé curae metus conubia","")
>insert into globalinx values("cél litoré, primis donéc dictum aliquet pulvîar et orci interdum.","")
>SELECT globalinx
>SCAN
>repl unaccentued with CHRTRAN(addfield, "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ","AAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy")
>endscan
>browse
>
>and I cant see any changes - all the browse does is to show globalinx with 4 records
>
>if I close and open gloablinx again the accents are still there
>
>I really don't understand this process at all
>
>Thanks so far
>
>Colin

Add browse before the SCAN and after. In this code the unaccentued column is first empty and then filled with the content without the accents. You need to read the code and understand it, it is very simple.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform