It appears that "%Substitution%" does not handle Unicode. Could that be fixed soon?
Jim
The fix is not to use substitution.
I take that as a "No"? Hadn't thought of that as a reply to my users whenever something doesn't work in my applications...maybe I'll give it a try myself ;)
Jim
If by handling you mean you variables containing a Unicode string, WIL substitution handles them by converting the string to the current Windows code page. This is the only thing it can do given that WIL scripts are always ANSI text. So this bit of functionality isn't going to change.
Okay. That is all I needed to know.
Jim
Quote from: td on August 05, 2015, 03:52:54 PM
If by handling you mean you variables containing a Unicode string, WIL substitution handles them by converting the string to the current Windows code page. This is the only thing it can do given that WIL scripts are always ANSI text. So this bit of functionality isn't going to change.
Besides that, StrReplace can do anything that substitution can do, only much more safely.
I mainly use Substitution for dynamic variable creation which saves me thousands of lines of code and in the formation of SQL scripts where that are LOTS of quotes involved and adding more makes reading/debugging SQL much more difficult. Can't see how StrReplace() can do either of those things.
Jim
Quote from: JTaylor on August 07, 2015, 07:50:57 AM
I mainly use Substitution for dynamic variable creation which saves me thousands of lines of code and in the formation of SQL scripts where that are LOTS of quotes involved and adding more makes reading/debugging SQL much more difficult. Can't see how StrReplace() can do either of those things.
Jim
When I need "dynamic" variables, I usually use an array of some kind, or a hash table of some sort (Scripting.Dictionary, and its cousins).
For one of my applications I store my variables/values in a database and with a few lines of code I can retrieve/save/sync all of variables for all of the users.
Jim