I have text file with the data RUBICEL NUÑEZ GORDILLO
i read the file with
m_data = FGETS(nFileHandle,1000)
messagebox(m_data)
replace nombre with m_data
messagebox(nombre)
why is the data changed to RUBICEL NUÑEZ GORDILLO
Same bytes interpreted in different codepages are different characters.
Neither FGETS nor REPLACE do byte value changes. The display in a messsagebox will be by whatever codepage the default VFP IDE codepage.
The file might have another one, or Unicode.
Make sure your transferring this making the necessary transition. It's not easy, as what codepage a file is in isn't available as file property or within the file. But many editors like Notepad++ will infer what codepage a file is in, so open up your source file with notepad++ and find out how the file is encoded.
Then you can use STRCONV() to convert from one to another codepage so the letter gets into your DBF the way it should be taking into account the codepage of VFP. Or you can save the source file with changed codepage, again possible with Notepad++.
Like I said earlier in another thread, have a good editor in your toolbelt.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.