I open a DBF file in Visual FoxPro and it shows "Ñ" character as "¥". I haven't created that DBF, I just open it and read it.
My question is: Is there any way to show those "¥" characters correctly in FoxPro? Or does it mean that this DBF file was created wrongly?
You probably need to know which encoding was used when the file was saved, depending on the version number of the file. Also the MSDN has a dedicated page about this topic. https://msdn.microsoft.com/en-US/library/5b10d8b6(v=vs.80).aspx
In specific the first paragraph might be for your interest:
When you create .dbf files, Visual FoxPro automatically gives them
code page marks so that you can tell which code pages they use.
However, if you use .dbf files from previous versions of FoxPro, they
might not have code page marks. You can determine whether a .dbf file
has a code page mark by using the CPDBF( ) function after opening the
file or by having Visual FoxPro check when you open the file.
You need to set the proper code page of your DBF file.
To know it, open the file with DBF Commander Pro, click 'Tools -> Set Codepage', then try to set the proper encoding by choosing various encodings from the list (leave 'Preview' check box turned on):
The program has 30-day fully functional trial period, so you can do your task at no charge.
Related
I have folders full of log files, and I'd like to display their final status in a column in the folder they are in. That is, in Details view I want to make a new column that shows a piece of text which is extracted from each file. I don't expect to find such a thing out there, and the searches I've tried haven't even yielded a hint about how I would go about writing a plugin to do any such thing. Is it possible?
This sort of thing used to be possible with custom column handler shell extensions but Microsoft removed support for those in Vista (3rd-party Explorer replacements might still support them).
Microsofts inadequate replacement are property handlers. You cannot do this for .log files, you would have to invent a .myapp-log file extension.
Some people abuse the Windows 10 cloud API to create columns but that only works in specific folders.
If you are looking for a specific string in the last line, you could perhaps use a custom icon handler for .log files.
So i tried to open a specific form in vb 6 it says Path/File Access Error "filepath.log";
when i tried to open the log file this is the content
Line 2: Could not create reference: '{90F3D7B3-92E7-44BA-B444-6A8E2A3BC375}#1.0#0'.
Line 3: Could not create reference: '{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0'.
is there a way to open that specific form. I can open other forms in the project.
UPDATE
I tried Opening The .vbp project file in notepad and found the source of the reference.
Object={90F3D7B3-92E7-44BA-B444-6A8E2A3BC375}#1.0#0; actskin4.ocx
Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; COMCTL32.OCX
still i don't know how to fix this.
The VB6 IDE will generally refuse to display a form if one or more of the controls on the form cannot be loaded.
(You can of course view the .frm file in a text editor if you just need to read some detail of the code.)
Based on the combined information from the log file and the .VBP it seems clear that the two OCX files listed are not registered on your development PC. They may or may not be physically present.
As a first step, I would search on the PC to see if they can be located. Typically OCX files would be installed into the \Windows\SysWOW64 or \Windows\System32 folders, although other locations are definitely possible.
(COMCTL32.OCX is a Microsoft file, so that is probably where you'll find it. I don't know what the other one is).
Assuming you find those files, most likely you can register them in the location you find them (there are a lot of possibilities but that is probably an OK start).
If you can't locate them you will have to find some copy (from another developer maybe?) before you can proceed. If actskin4.ocx is a professional 3rd party control then probably it would have come with a proper installer which you should located & run.
Here are Microsoft's instructions to manually register a DLL / OCX.
I am new to Visual basic 6 and I use it to run a code (not written by me) for my data analysis. One of the output file is tmaze1.1.rmap
I am not able to open this file. what I know is, it has values in a 64 by 48 array.
I tried opening it through notepad, wordpad etc but it only shows symbols.
Please help.
Thanks.
Try opening the file with a Hex editor. Google "free hex editor" to download one if you don't already have one installed. The Hex editor will allow you to read the values inside the file.
I want to create a a SpreadsheetML file on local drive which can be opened in MS Excel or Open Office by clicking on file in Windows Explorer.
I tried all filename extensions registered to Microsoft Excel i could find so far.
Some of them (.xls for example) allows file to be opened, but after "File is in different format than specified by the file extension" warning dialog. Some extensions (like .xlsx) causes Excel to show format error dialog without opening file.
Wikipedia tells that extension should be .xml, but it is registered to be opened by web browser by default.
This, this and this similar questions are about downloading a file from web and setting proper content-type. But i can not change content-type for local file.
This article explains how this annoying Extension Hardening mechanism works and how to disable it, but i think it is wrong to force user to disable security features just to allow spreadsheet file to be opened.
So there is no solution or am i missing something?
Now Open Office can open .xlsx (and read) files and Excel can open (and read) .ods files. My suggestion is to pick one of them that best suits your audience and your understanding of the specific file format.
Both of the applications have advantages and disadvanges and non-supported features between the two of them.
I suggest reviewing the document Differences between the OpenDocument Spreadsheet (.ods) format and the Excel (.xlsx) format.
When you work with two file formats, like .xlsx and .ods, there might
be formatting differences, and not all features will be available.
You’ll be able to convert data and content, but the way you work with
the content might be different depending on which formats you use.
One gotcha is with Open Office when you save a .xlsx file it will change the format to a .ods file. Both the applications will re-arrange the folder structure after saving anyway.
The biggest change is how you go about creating the SpreadsheetML files, both Open Office and Excel have a different folder structure depending on the file extension you will use.
Here is a short example of an Excel folder format.
-/
- _rels/
- .rels
- xl/
- _rels/
- workbook.xml.rels
- sheet1.xml
- workbook.xml
- [Content_Types].xml
I have created a sample GitHub repository for this with a sample that will open in both Excel and Open Office.
https://github.com/Nico-StackOverflow/proper-spreadsheetml-file-extension
I have a batch file that executes during my build. Every time I check it in with changes, the file gets saved as UTF-8 (or UTF-16, hell I don't know), and thus gets a BOM. That makes it so that whenever the batch file is run, execution will fail because batch files have to be encoded as plain ASCII.
While it is simple to change the encoding on the file when I save it, I forget a lot of times.
Is there a way that I can get TFS or Visual Studio to ALWAYS save that one file in the proper format? (I know I can set VS up to always save all files as a certain type, but I was hoping I could make the change for just one file)
From within Source Control Explorer right-click the file you 're interested in & select 'Properties'.
On the 'General' tab there's the option to "Set Encoding". Check it out to see if you can find a suitable encoding to your purpose.