Wintertree Software Inc.

WSpell ActiveX Spelling Checker

Home Site index Contact us Catalog Shopping Cart Products Support Search

You are here: Home > Support > WSpell > Unable to open dictionary files when comma appears in path name


Unable to open dictionary files when comma appears in path name

Applies to: All versions

Problem 1: If wspell.ocx is registered in a folder in which appears in a path containing a comma, WSpell will be unable to open any dictionary files located in that folder. For example, if wspell.ocx is registered in "c:\Program Files\XYZ, Inc.\myapp", and the dictionary files used by WSpell are also installed in that folder, WSpell will be unable to open any of those dictionary files. This applies to both main and user dictionary files.

Discussion: WSpell uses a comma as a file-name separator in MainDictionaryFiles and UserDictionaryFiles. When dictionary file names assigned to these properties contain a relative (or no) path, WSpell automatically prefixes the path to the directory containing wspell.ocx to the dictionary file names. Thus, if wspell.ocx is registered in "c:\Program Files\XYZ, Inc.\myapp", and MainDictionaryFiles is set to "ssceam.tlx,ssceam2.clx", WSpell internally sets MainDictionaryFiles to "c:\Program Files\XYZ, Inc.\myapp\ssceam.tlx,c:\Program Files\XYZ, Inc.\myapp\ssceam2.clx". The comma appearing in "XYZ, Inc." looks to WSpell like a file-name separator, so WSpell attempts to open the following four files:

Neither of the specified dictionary files (ssceam.tlx and ssceam2.clx) is therefore opened.

Solutions: The best solution currently is to avoid registering wspell.ocx in a path containing a comma in its name, or to install the dictionary files in a separate path (without a comma in its name) and to use full path names when assigning MainDictionaryFiles and UserDictionaryFiles. For example, if wspell.ocx is registered in "c:\Program Files\XYZ, Inc.\myapp", install the dictionary files in "c:\myapp" and set MainDictionaryFiles to "c:\myapp\ssceam.tlx,c:\myapp\ssceam2.clx".

Another solution, if a path name containing a comma must be used, is to determine the short, "8.3" name of the directory, and assign WSpell's MainDictionaryFiles and UserDictionaryFiles properties with full paths containing the short directory names substituted for the directory names containing commas. For example, if the dictionary files are installed in "c:\Program Files\XYZ, Inc.\myapp", and "XYZ, Inc." has a short name of "XYZ_IN~1", then set MainDictionaryFiles to "c:\Program Files\XYZ_IN~1\myapp\ssceam.tlx,c:\Program Files\XYZ_IN~1\myapp\ssceam2.clx".

Problem 2: If any of the dictionary files assigned to MainDictionaryFiles or UserDictionaryFiles contain a path containing a comma, WSpell will be unable to open those dictionary files. For example, if you set MainDictionaryFiles to "c:\Program Files\XYZ, Inc.\myapp\ssceam.tlx,c:\Program Files\XYZ, Inc.\myapp\ssceam2.clx", WSpell will be unable to open any of the files.

Discussion: The problem is similar to the preceding problem: WSpell uses the comma as a file-name separator, so the comma appearing in the path name causes WSpell to break the string incorrectly.

Solution: The solutions discussed for Problem 1 apply here as well.


Home Site index Contact us Catalog Shopping Cart Products Support Search


Copyright © 2015 Wintertree Software Inc.