swmm-python icon indicating copy to clipboard operation
swmm-python copied to clipboard

Support for unicode filenames

Open michaeltryby opened this issue 3 years ago • 5 comments

Passing a filename containing unicode characters causes ERROR 303.

Bug reported by pyswmm user.

michaeltryby avatar Mar 29 '21 14:03 michaeltryby

One possible solution would be to use _wfopen() in SWMM on Windows.

https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen?view=msvc-160

michaeltryby avatar Mar 29 '21 17:03 michaeltryby

String must be encoded using Latin-1 before passing to SWMM engine. Previously in older pyswmm versions, six.b() was used before passing to SWMM engine.

jennwuu avatar Mar 31 '21 13:03 jennwuu

@michaeltryby is dev-unicode branch where you last worked on this?

jennwuu avatar Mar 31 '21 21:03 jennwuu

@jennwuu Yes that is is the branch I opened up to work on it.

michaeltryby avatar Mar 31 '21 21:03 michaeltryby

@michaeltryby looks like we can close this?

abhiramm7 avatar May 22 '22 01:05 abhiramm7