patrickTingen / DataDigger

A dynamic dataviewer for your Progress / OpenEdge databases
https://datadigger.wordpress.com/
MIT License
50 stars 24 forks source link

Function resolveOsVars is returning invalid values with cpinternal UTF-8 #85

Closed movedoa closed 2 years ago

movedoa commented 2 years ago

The function resolveOsVars returns wrong values when the variables resolve to extended characters. This can happen with %appdata% for example since it contains the windows user name which can contain all sorts of fun characters.

See: https://knowledgebase.progress.com/articles/Article/OS-GETENV-with-cpinternal-utf-8-corrupts-extended-characters

Replacing OS-GETENV with System.Environment:GetEnvironmentVariable fixed the problem for me.

OS-GETENV is also used in other places, it should also be fixed there.