EvenAR / node-simconnect

A cross platform SimConnect client library for Node.JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multibyte chars in Paths - Size Mismatch

whakamolenz opened this issue · comments

Hi Even,

not sure if this is actually an overal simconnect issue or with the node implementation - but keen for your thoughts.

We pass paths for flight plans to the aICreateEnrouteATCAircraft and aISetAircraftFlightPlan functions. We store these in the users profile and we are finding for users that have usernames with non default chars like C:\Users\Øystein - then we get a size mismatch exception.

There are some claims it worked previously for these users when we were using a pure c++ implementation.

Thanks :-)

@whakamolenz I think I have tracked down the problem. Does the new node-simconnect@3.2.1-beta.2 work?

@EvenAR - thank you for that update - it has resolved the size mismatch error - but we still get an exception...

SimConnect Exception: LOAD_FLIGHTPLAN_FAILED E:\Øystein\fsltl-trafic-injector\temp-plans\PLAN_QXE2429

But that now makes me think Simconnect itself is not happy with paths with multibyte chars in it.

When the path is say E:\Oystein\fsltl-trafic-injector\temp-plans\PLAN_QXE2429 it works fine.

@whakamolenz Ok, I did some more (actual) testing and looks like the size mismatch was not caused by wrong character encoding which I first thought, but just wrong size calculation 😅 Can you give the new 3.2.1-beta.3 a try?

Awesome - yes that has fixed it! Thank you again :-)