Menu

#942 string to wstr conversion fails for invalid multibyte characters

closed
nobody
None
compiler
2021-10-03
2021-10-03
No

Forum report: WSTR Crash on linux 32-bit

Example:

dim as string s = chr(&hC4 , &hEE)

? lcase(Wstr(s))

Is due to unhandled error condition of mbstowcs() in the rtlib

Discussion

  • Jeff Marshall

    Jeff Marshall - 2021-10-03

    I see now. mbstowcs() behaves differently for me on windows versus linux.

     
  • Jeff Marshall

    Jeff Marshall - 2021-10-03

    fixed in fbc 1.09.0
    commit: [95fd0fab9018436cf6b8283dbc6248534367a9b8]

    There are differences between windows and linux on how invalid mutibyte chars are handled

     

    Related

    Commit: [95fd0f]

  • Jeff Marshall

    Jeff Marshall - 2021-10-03
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB