Hi All. This is a review of Boost.Nowide library. I am not really familiar with the problem. I used to do trivial tasks with files on Windows, but they were always ASCII, so the problems solved by Boost.Nowide never affected me. I am also not fa,iliar with the problems of converting from Windows encoding (*WTF* seems like the right choice of name) to UTF-8. I have read the documentation, and got some additional information from the author. I have downloaded the library and have run a toy program that plays with names that cannot be encoded in a single code-page. I am testing on Windows 7, MinGW, GCC 6.3, with -std=c++03. Compilation and linking works fine. Tests work fine too. Then, I tried the same example with normal `std::ifstream` and it did not work on Unicode file names and strings, which conforms that Boost.Nowide solves an existing problem. DESIGN: clear, logical, intuitive. IMPLEMENTATION: I did not look at. DOCUMENTATION: clear. POTENTIAL USEFULNESS: as specified in the docs, if you want to do things with multilingual strings in a platform independent way, you need a library like this. I vote to *ACCEPT* the library. I may not be qualified enough (the manager will weigh my vote), but the desctiption of the library, as well as the replies from Artyom convince me that the library addresses the problem in the right way and is reliable. Artyom, thanks for sharing this library, and submitting it for review. One minor thing. In th be docs (http://cppcms.com/files/nowide/html/) we read: boost::nowide::widen http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#a6baacc1bb... returns std::string. I thing is thsould be std::wstring? Regards, &rzej;
On Tue, Jun 20, 2017 at 12:28 AM, Andrzej Krzemienski via Boost
Hi All. This is a review of Boost.Nowide library. [snip[ DESIGN: clear, logical, intuitive. IMPLEMENTATION: I did not look at. DOCUMENTATION: clear. POTENTIAL USEFULNESS: as specified in the docs, if you want to do things with multilingual strings in a platform independent way, you need a library like this.
I vote to *ACCEPT* the library. I may not be qualified enough (the manager will weigh my vote), but the desctiption of the library, as well as the replies from Artyom convince me that the library addresses the problem in the right way and is reliable.
Artyom, thanks for sharing this library, and submitting it for review.
Thank You very much for the review and the inputs.
One minor thing. In th be docs (http://cppcms.com/files/nowide/html/) we read: boost::nowide::widen http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#a6baacc1bb... returns std::string.
I thing is thsould be std::wstring?
Regards, &rzej;
Actually this version is for fixed user buffer - function without allocation. So it is right one. Another versions return std::wstring Regards Artyom
2017-06-20 9:47 GMT+02:00 Artyom Beilis via Boost
Hi All. This is a review of Boost.Nowide library. [snip[ DESIGN: clear, logical, intuitive. IMPLEMENTATION: I did not look at. DOCUMENTATION: clear. POTENTIAL USEFULNESS: as specified in the docs, if you want to do things with multilingual strings in a platform independent way, you need a
On Tue, Jun 20, 2017 at 12:28 AM, Andrzej Krzemienski via Boost
wrote: library like this.
I vote to *ACCEPT* the library. I may not be qualified enough (the manager will weigh my vote), but the desctiption of the library, as well as the replies from Artyom convince me that the library addresses the problem in the right way and is reliable.
Artyom, thanks for sharing this library, and submitting it for review.
Thank You very much for the review and the inputs.
One minor thing. In th be docs (http://cppcms.com/files/nowide/html/) we read: boost::nowide::widen <http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html# a6baacc1bb80c134a2ce37f13977b5500> returns std::string.
I thing is thsould be std::wstring?
Regards, &rzej;
Actually this version is for fixed user buffer - function without allocation. So it is right one. Another versions return std::wstring
But when I look into the reference page: http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#a6baacc1bb... I cannot see any overload returning `std::string`? Regards, &rzej;
Thank You very much for the review and the inputs.
One minor thing. In th be docs (http://cppcms.com/files/nowide/html/) we read: boost::nowide::widen <http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html# a6baacc1bb80c134a2ce37f13977b5500> returns std::string.
I thing is thsould be std::wstring?
Regards, &rzej;
Actually this version is for fixed user buffer - function without allocation. So it is right one. Another versions return std::wstring
But when I look into the reference page: http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#a6baacc1bb...
I cannot see any overload returning `std::string`?
Regards, &rzej;
These: std::string narrow (wchar_t const *s) std::wstring widen (char const *s) std::string narrow (std::wstring const &s) std::wstring widen (std::string const &s) See: http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#a13b4f6f7f... Artyom
Thank You very much for the review and the inputs.
One minor thing. In th be docs (http://cppcms.com/files/nowide/html/) we read: boost::nowide::widen <http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html# a6baacc1bb80c134a2ce37f13977b5500> returns std::string.
I thing is thsould be std::wstring?
Regards, &rzej;
Actually this version is for fixed user buffer - function without allocation. So it is right one. Another versions return std::wstring
But when I look into the reference page: http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html# a6baacc1bb80c134a2ce37f13977b5500
I cannot see any overload returning `std::string`?
Regards, &rzej;
These:
std::string narrow (wchar_t const *s) std::wstring widen (char const *s) std::string narrow (std::wstring const &s) std::wstring widen (std::string const &s)
See: http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html# a13b4f6f7f97f889ec858dde2d367b130
Yes, I can see those. And what they say is that functions called `narrow` return a `std::string`, and functions `widen` return a `std::wstring`, and
2017-06-20 11:02 GMT+02:00 Artyom Beilis via Boost
http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#a6baacc1bb... returns std::string.
It says something different than the declarations you have quoted. Regards, &rzej;
.
But the quoted tutorial says:
boost::nowide::widen
http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#a6baacc1bb... returns std::string.
It says something different than the declarations you have quoted.
Regards, &rzej;
Ahhhhhhh Now I got it. You refer to http://cppcms.com/files/nowide/html/index.html#using_custom Yes you are right - I need to fix it. Artyom
participants (2)
-
Andrzej Krzemienski
-
Artyom Beilis