Here is the LegacyEncoding Agent Configuration Object parameter description from the Web Agent Configuration Guide:
Forces the agent to replace any dollar sign ($) characters in legacy URLs with a hyphen (-). Doing this also ensures backwards comparability with MSR, Password Services, and DMS. When this parameter is set to no, the agent converts the string $SM$ to -SM-. When this parameter is set to yes, the agent does not convert the dollar sign ($) character.
Please note that most Web Agents default to No when this parameter is not set, however, older agents known as non-Framework agents, such as the agent for Domino, default to Yes when this parameter is not set. If there is any question as to what setting any particular agent may be defaulting to, simply set the parameter explicitly to remove any doubt.