AnsweredAssumed Answered

bug and fix for "surface to pts", "surface to grid" and macros with intermediate list files

Question asked by Ronny Schneider on Nov 14, 2019
Latest reply on Dec 2, 2019 by Gary Lantaff

I always got an encoding error running those macros.

I chased it down to the use of the wrong separator. On computers with english region settings the "digit grouping symbol" and the "list separator" are usually the same character a comma. But for most other countries they differ from each other and we need to use the latter.

 

The "digit grouping symbol" is in our case the character '

And that naturally messes up the assembly of the output string since it is also limited by them. You would have to double encapsulate them, or something like that, to make it work.

 

In both macros I replaced

c = CultureInfo.CurrentCulture.NumberFormat.NumberGroupSeparator

 

with

c = CultureInfo.CurrentCulture.TextInfo.ListSeparator

Outcomes