WSpell ActiveX Spelling Checker - Support |
Home Site index Contact us Catalog Shopping Cart Products Support Search |
You are here: Home > Support > WSpell > Most or all words reported as misspellings
Applies to: All versions
Problem: When checking text, WSpell reports all or most words as misspellings.
Discussion: The main American and UK English dictionaries are shipped as two files: SSCEAM.TLX (or SSCEBR.TLX) and SSCEAM2.CLX (or SSCEBR2.CLX). The first file contains about 1,000 of the most commonly used words in English. The second file contains about 100,000 of the most commonly used words. Words in the first file are also present in the second file.
If WSpell accepts words such as "the" or "of" but doesn't accept words such as "engine" or "improvement", the most likely cause is failure to open the SSCEAM2.CLX (or SSCEBR2.CLX) file. If WSpell rejects all words including words such as "the" and "of", the most likely cause is failure to open any dictionary files. The following points may help you to track down the problem:
WSpell's MainDictionaryFiles property must be set to the list of files forming the main dictionary. By default, MainDictionaryFiles is set to "ssceam.tlx,ssceam2.clx".
The files listed in the MainDictionaryFiles property must be separated with a comma. No spaces should follow the commas.
If the file names in MainDictionaryFiles contain no paths, then the corresponding files must be located in the same folder as the registered copy of wspell.ocx.
If the dictionary files reside in a different folder than the folder containing wspell.ocx, then the file names listed in MainDictionaryFiles must contain full paths. For example, "c:\myapp\dicts\ssceam.tlx,c:\myapp\dicts\ssceam2.clx".
After setting the MainDictionaryFiles property or after calling the AddMainDictionaryMethod, the MainDictionaryFiles property will contain only the dictionary files which could be opened. If MainDictionaryFiles is empty, then none of the dictionary files could be opened.
If WSpell cannot open a dictionary file, then the ErrorCode property will contain a code which explains the reason. See "Error Codes" in the Constants section of the WSpell programmer's guide for an explanation of each code.
Another application which uses WSpell may have been installed on the system. Under certain circumstances, the existence of another copy of WSpell in a different folder may prevent your application's use of WSpell from finding its dictionaries. For solutions to this problem and a recommended approach to preventing it, please see Preventing conflicts with other applications that use WSpell.
The dictionary file name or part of the path name assigned to MainDictionaryFiles may be misspelled. For example, ssceam2.clx is contained in folder c:\myapp\dicts on the run-time system, and the path name your application assigns to MainDictionaryFiles is "c:\myapp\dict\ssceam2.clx", or "c:\myapp\dicts\ssecam2.clx" (look carefully to spot the misspellings!).
The path name assigned to MainDictionaryFiles may be syntactically incorrect. For example, the path passed assigned to MainDictionaryFiles is "c\:myapp\dicts\ssceam2.clx". Another possible hard-to-spot cause is spaces at the beginning or end of the string assigned to MainDictionaryFiles.
One or more of the indicated dictionary files is not contained in the folder indicated by the path name assigned to MainDictionaryFiles. For example, ssceam.tlx and ssceam2.clx are contained in folder c:\myapp\dicts on the run-time system. The string your application assigns to MainDictionaryFiles is "c:\myapp\dicts\am\ssceam.tlx,c:\myapp\dicts\am\ssceam2.clx". Another possibility: Your application assigns "c:\myapp\dicts\am\ssceam.tlx,c:\myapp\dicts\am\ssceam2.clx" to MainDictionaryFiles, but you forgot to actually copy the dictionary files to that folder, or one or more of the dictionary files were subsequently deleted for some reason.
An important point to consider is that WSpell passes the dictionary file names to Windows verbatim for opening. If Windows returns an error code, WSpell stops attempting to open the dictionary file. It doesn't search for the dictionary file in other folders, try different spellings of the dictionary file name, or magically blast through the file system's permissions to open the file at all costs. WSpell merely tries to open the files configured in MainDictionaryFiles, and if it can't open one or more of them, words contained within the unopenable files will be reported as misspelled. It's worth mentioning that failure to open a main dictionary file does not result in error messages displayed to the user. This is both a blessing and a curse: The user is not confronted with confusing messages about dictionary files, but it can be more difficult for you to detect that a problem has occurred and diagnose the cause of that problem.
Another, though less common, cause of dictionary open failure is file corruption. ssceam2.clx (and all dictionary files with a .clx extension) are binary files. If these files are transferred from one system to another using "ASCII" or "Text Mode" file transfer, they will be corrupted. If the dictionaries were once openable but WSpell suddenly started returning errors on attempts to open them, and no other changes took place on the run-time system, it's possible that the dictionary files became corrupted through file system corruption or some other cause. Replacing the files should solve the problem.
If the dictionary files open successfully but many words are still reported as misspelled, a potential cause is using a relative path name in the value assigned to MainDictionaryFiles (e.g., "..\dicts\ssceam.tlx,..\dicts\ssceam2.clx"). Under some circumstances, WSpell will re-open a compressed (.clx) dictionary file while checking spelling or looking up suggestions to load parts of the dictionary not cached in memory. To re-open the file, it uses the path name assigned in MainDictionaryFiles. If the path name is relative, and the calling application's current directory has changed, the attempt to re-open the file may fail. As a result, the needed parts of the dictionary are not loaded into memory, and the words contained within those parts are reported as misspelled. If a path is specified in the value assigned to MainDictionaryFiles, the path should therefore always be absolute (i.e., should start from the file system's root directory). Note that this does not apply if no path is specified in the value assigned to MainDictionaryFiles (e.g., "ssceam.tlx,ssceam2.clx"), because WSpell determines the absolute path of the folder containing wspell.ocx in this case, and automatically prefixes that folder onto the file names to form an absolute path.
An effective way to diagnose and correct dictionary-file problems is to create a diagnostic log file (click here for instructions). WSpell will record diagnostic information in the file you configure, including the names of dictionary files it tries to open and the results of those attempts. Sometimes by examining the contents of the diagnostic file you may be able to spot the problem, such as a malformed or misspelled path. If you contact Wintertree Software's Support group for help with solving dictionary related problems, the first thing they will ask is that you create the diagnostic log file and send the file's contents, so you can save time by including the contents when you contact Support initially.
Copyright © 2015 Wintertree Software Inc.