Skip to content

Commit

Permalink
replace
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgen-lentz committed Jan 31, 2025
1 parent afe86c8 commit 7e02a16
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions amplpy/iterators.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@ cdef class EnvIterator(object):
free(self.iterator)
campl.AMPL_EnvironmentGetEnvironmentVarIterate(self.env_c, &self.iterator)

if sys.platform == 'win32':
name = name_c.decode('utf-16')
value = value_c.decode('utf-16')
else:
name = name_c.decode('utf-8')
value = value_c.decode('utf-8')
name = name_c.decode('utf-8', errors='replace')
value = value_c.decode('utf-8', errors='replace')

free(name_c)
free(value_c)
Expand Down

0 comments on commit 7e02a16

Please sign in to comment.