Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fields
Message
De
14/12/2006 04:22:29
 
 
À
14/12/2006 04:15:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Fields
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01177490
Message ID:
01177509
Vues:
22
Are you absolutely sure that your old table really contains arabic text? I suspect that you have something else in the table. The thing is that this is normally handled 100% automatic by VFP, and if it is not handled automatically, you only have three choices:
1. Use cpconvert.
2. Try to find a correlation between each character in the old table and the new table. Then you create a small function, using chrtran(), to translate the old text into the new table. Only you have the information necessary to create this small program.
3. Do it manually, meaning typing the text manually.

>hi,
>cpconvert(), no way to help me becuse
>this table created many years ago via foxpro2.5 under DOS
>to insert arabic characters we use system(NAFITHA)this system help use to convert keybord keys from English language to Arabic language ,
>
>table cnv_word.dbf have 2 fileds one for Arabic characters under windows
>another filed have all keys at keybord under DOS if any body open this field see rubbish characters, via code i send it at the first thread works ok.
>
>but i must convert field by field i need your help to change this code to convert any fields have rubbish charactres ,
>thank you .
>
>>Check cpconvert() in help.
>>
>>>hi,
>>>
>>>sorry , field(WND_CHRS) have Arabic characters at another table
>>>
>>>just i need any example or way to
>>>replace (any fields is characters type) WITH NEWNAME&&&
>>>
>>>thanks
>>>>If I understand your question correctly, you can use transform() which will convert any value, both fields, variables and properties, into a character string.
>>>>
>>>>>hi all,
>>>>>is there away to convert any fields at my table have characters type,
>>>>>
>>>>>without determine the fields that need to convert as.
>>>>>
>>>>>PUBLIC newname
>>>>>
>>>>>close database
>>>>>USE CNV_WORD IN A ORDER 2
>>>>>
>>>>>USE code99 IN C
>>>>>
>>>>>SELECT C
>>>>>NEW_WORK = SPACE(1)
>>>>>IND_1 = 1
>>>>>DO WHILE .NOT. EOF()
>>>>>
>>>>>	OLD_NAME = cname
>>>>>	do cnv_work
>>>>>*	REPLACE cname WITH NEWNAME&&works
>>>>>	replace (any fields is characters type) WITH NEWNAME&&&
>>>>>	IF .NOT. EOF()
>>>>>		SKIP
>>>>>	ENDIF	
>>>>>ENDDO
>>>>>brow
>>>>>
>>>>>procedure cnv_work
>>>>>	SELECT A
>>>>>	wrk_leng = len(alltrim(old_name))+1
>>>>>	DO WHILE IND_1 < wrk_leng
>>>>>		WRK_CHRS = SUBSTR(OLD_NAME,IND_1,1)
>>>>>		SEEK WRK_CHRS
>>>>>		IF FOUND()
>>>>>			NEW_WORK = NEW_WORK + WND_CHRS
>>>>>		ELSE
>>>>>			NEW_WORK = NEW_WORK + WRK_CHRS
>>>>>		ENDIF
>>>>>		IND_1 = IND_1 + 1
>>>>>	ENDDO
>>>>>	NEWNAME = NEW_WORK
>>>>>	NEW_WORK = SPACE(1)
>>>>>	IND_1 = 1
>>>>>	select c
>>>>>return
>>>>>
>>>>>
>>>>>thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform