Home > Archive > FoxPro database connector > April 2005 > Code Page









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Code Page
Roger

2005-04-11, 8:26 pm

I have re-written a FoxPro DOS system into Visual FoxPro.

I am using free standing tables in the new system.

I will be copying all tables over from the DOS system to the new system.
Do I need to open exclusive in Visual FoxPro each table that I have copied
over and select the Windows radio button or the MS_DOS radio button????
Will my choice effect how these tables function? (Eg speed, etc.)

The tables were originally created in the DOS system that didn't have a Code
Page designation but will only be used in the new Visual FoxPro system.
Thanks for any help you can give me to understand this. The Visual FoxPro
Help was not very helpful.

Roger
Lee Mitchell

2005-04-11, 8:26 pm

Hi Roger:

Changing the code page should not hinder performance.

This code changes the code page to 1252- Windows ANSI.

LOCAL nNumDBFs, nLoopVar, cCurrDir

cCurrDir = SYS(5) + CURDIR()

WAIT WINDOW "Changing Code Page in " + cCurrDir + " Please Be Patient" ;
NOWAIT NOCLEAR

nNumDBFs = ADIR(aDBFs, "*.DBF")
clear
FOR nLoopVar = 1 TO nNumDBFs

DO HOME() + " \TOOLS\CPZERO\CPZERO
" WITH cCurrDir + aDBFs[nLoopVar,1],12
52
ENDFOR

WAIT WINDOW "Finished Changing Code Page. Press Any Key To Continue."
** End code


I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003


>I have re-written a FoxPro DOS system into Visual FoxPro.


>I am using free standing tables in the new system.


>I will be copying all tables over from the DOS system to the new system.
>Do I need to open exclusive in Visual FoxPro each table that I have copied
>over and select the Windows radio button or the MS_DOS radio button????
>Will my choice effect how these tables function? (Eg speed, etc.)


>The tables were originally created in the DOS system that didn't have a

Code
>Page designation but will only be used in the new Visual FoxPro system.
>Thanks for any help you can give me to understand this. The Visual FoxPro
>Help was not very helpful.


>Roger


Roger

2005-04-11, 8:26 pm

Lee,

Thanks for the help!!!

So, when I open the table exclusive I should then select Windows as the Code
Page instead of MS_DOS? Does it matter which one I select?


Hope you are doing well.

Roger






"Lee Mitchell" wrote:

> Hi Roger:
>
> Changing the code page should not hinder performance.
>
> This code changes the code page to 1252- Windows ANSI.
>
> LOCAL nNumDBFs, nLoopVar, cCurrDir
>
> cCurrDir = SYS(5) + CURDIR()
>
> WAIT WINDOW "Changing Code Page in " + cCurrDir + " Please Be Patient" ;
> NOWAIT NOCLEAR
>
> nNumDBFs = ADIR(aDBFs, "*.DBF")
> clear
> FOR nLoopVar = 1 TO nNumDBFs
>
> DO HOME() + " \TOOLS\CPZERO\CPZERO
" WITH cCurrDir + aDBFs[nLoopVar,1],12
52
> ENDFOR
>
> WAIT WINDOW "Finished Changing Code Page. Press Any Key To Continue."
> ** End code
>
>
> I hope this helps.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> Sincerely,
> Microsoft FoxPro Technical Support
> Lee Mitchell
>
> *-- VFP9 HAS ARRIVED!! --*
> Read about all the new features of VFP9 here:
> http://msdn.microsoft.com/vfoxpro/
>
> *--Purchase VFP 9.0 here:
> http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
> 69-4500-8bf2-3f06689f4ab3&type=ovr
>
> Keep an eye on the product lifecycle for Visual FoxPro here:
> http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
> - VFP5 Mainstream Support retired June 30th, 2003
> - VFP6 Mainstream Support retired Sept. 30th, 2003
>
>
>
>
>
> Code
>
>
>

Dan Freeman

2005-04-11, 8:26 pm

The fact that you're asking whether it matters means it probably doesn't.
<g>

But instead of Lee's suggestion for actually changing the code page for each
dbf, why not just skip the dialog?

SET CPDIALOG OFF

Won't affect a thing.

Dan

Roger wrote:[color=darkred
]
> Lee,
>
> Thanks for the help!!!
>
> So, when I open the table exclusive I should then select Windows as
> the Code Page instead of MS_DOS? Does it matter which one I select?
>
>
> Hope you are doing well.
>
> Roger
>
>
>
>
>
>
> "Lee Mitchell" wrote:
>
http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52[color=darkred]


Jeroen van Kalken

2005-04-11, 8:26 pm

On Mon, 11 Apr 2005 11:41:05 -0700, "Roger"
<Roger@discussions.microsoft.com> wrote:

>Lee,
>Thanks for the help!!!
>
>So, when I open the table exclusive I should then select Windows as the Code
>Page instead of MS_DOS? Does it matter which one I select?

Depends,Yes

If you have used special characters (accents, linesymbols) in the DBF
when you were using it in DOS, you have to fill in the codepage which
was used in DOS.
Every character is represented internally as a byte (meaning a value
between 0 and 255); the first 127 are standardised and contains the
numerals, keyboard symbols and the characters a-z (upper and
lowercase).
The special characters like é,ü,§ are given a number between 128 and
255, the exact number is dependend on the codepage in use.
e.g. number 129 represents a ü in codepage 437 (=US msdos) but |(an
unkown char) in codepage 1252 (=Windows)
and number 252 represents a ³ in codepage 437 (=US msdos) but ü in
codepage 1252 (=Windows)

So if you set the codepage wrong, all your special characters will be
a mess.
If you do set the codepage to something, VFP will automatically
convert all the charfields to the currently used codepage as soon as
they are read from the DBF (and convert them back when they are
written)


[color=darkred]
>"Lee Mitchell" wrote:

Mariano Donaldson

2005-04-19, 11:24 am

Roger

I've found that the best solution is:

SET CPDIALOG OFF

and

CODEPAGE=850 on the config.fpw

HTH

Mariano Donaldson
pony@fibertel.com.ar
Buenos Aires, Argentina

"Roger" <Roger@discussions.microsoft.com> escribió en el mensaje
news:181E9FAB-DB91-4E45-9B35- 9C7F41CDD588@microso
ft.com...
> I have re-written a FoxPro DOS system into Visual FoxPro.
>
> I am using free standing tables in the new system.
>
> I will be copying all tables over from the DOS system to the new system.
> Do I need to open exclusive in Visual FoxPro each table that I have copied
> over and select the Windows radio button or the MS_DOS radio button????
> Will my choice effect how these tables function? (Eg speed, etc.)
>
> The tables were originally created in the DOS system that didn't have a

Code
> Page designation but will only be used in the new Visual FoxPro system.
> Thanks for any help you can give me to understand this. The Visual FoxPro
> Help was not very helpful.
>
> Roger



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com