Menu

#174 ConvertToWide and ConvertToNarrow for string conversions

8
pending
1
2023-08-27
2021-02-19
No

Currently, we have a simple way to convert narrow and wide strings to owl::tstring using owl::to_tstring. It would be nice to have the converse functions ConvertToWide and ConvertToNarrow.

This would allow the deprecation of the string conversion macros. See [bugs:#486].

It would also simplify code that currently calls the low-level Windows API functions MultiByteToWideChar and WideCharToMultiByte.

See "Converting between narrow and wide strings" in "Strings in OWLNext".

Related

Bugs: #486
Feature Requests: #87
Wiki: OWLNext_Roadmap_and_Prereleases
Wiki: Strings_in_OWLNext

Discussion

  • Vidar Hasfjord

    Vidar Hasfjord - 2021-02-19

    ConvertToNarrow and ConvertToWide have now been implemented in Owlet [r5381].

    Specialisations to owl::from_tstring for std::string and std::wstring were added in Owlet [r5382]. These call ConvertToNarrow and ConvertToWide, respectively. See [feature-requests:#87/#03c0].

     

    Related

    Commit: [r5381]
    Commit: [r5382]


    Last edit: Vidar Hasfjord 2021-02-19
  • Vidar Hasfjord

    Vidar Hasfjord - 2021-02-19
    • assigned_to: Vidar Hasfjord
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2021-02-21

    This feature has now been implemented on the trunk [r5384].

     

    Related

    Commit: [r5384]

  • Vidar Hasfjord

    Vidar Hasfjord - 2021-02-21
    • Group: unspecified --> 7.1
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2021-02-21
    • status: open --> pending
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2023-08-27

    ConvertToNarrow and ConvertToWide has been reimplemented in Owlet [r6470] to fix conversion issues [bugs:#486]. This fix was merged into the trunk [r6537].

     

    Related

    Bugs: #486
    Commit: [r6470]
    Commit: [r6537]


    Last edit: Vidar Hasfjord 2023-09-08

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB