[nowide] Library looks for a review manager

Hello, The project Boost.Nowide searches a review manager: What is Boost.Nowide: --------------------- Boost.Nowide is a library implemented by Artyom Beilis that make cross platform Unicode aware programming easier. The library provides an implementation of standard C and C++ library functions, such that their inputs are UTF-8 aware on Windows without requiring to use Wide API. Documentation: http://cppcms.com/files/nowide/html/ Downloads: http://cppcms.com/files/nowide/ Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/

I've briefly looked through this library, but haven't gotten around to using it yet. After reading the documentation the only question I really have is if there's a way to have it as a drop-in replacement. Surely 'using namespace boost::nowide' would conflict with STL definitions. I can see why this may not be desirable as it can lead to weird bugs, like the ineffectiveness of sync_with_stdio. Besides that, I think this is a great library and I still find it a little odd why only in 2012 we're getting awesome stuff like this in Boost. On 14/09/12 19:15, Artyom Beilis wrote:
Boost.Nowide is a library implemented by Artyom Beilis that make cross platform Unicode aware programming easier.
The library provides an implementation of standard C and C++ library functions, such that their inputs are UTF-8 aware on Windows without requiring to use Wide API.
Documentation: http://cppcms.com/files/nowide/html/ Downloads: http://cppcms.com/files/nowide/

From: Jookia <166291@gmail.com>
After reading the documentation the only question I really have is if there's a way to have it as a drop-in replacement. Surely 'using namespace boost::nowide' would conflict with STL definitions.
You just should use explicit namespace or shorten it namespace nw = boost::nowide; and then nw::fstream etc.
I can see why this may not be desirable as it can lead to weird bugs, like the ineffectiveness of sync_with_stdio.
See, the idea is to keep the API as familiar as possible such that simple mechanical conversion can be done, similarly to boost::shared_ptr -> std::shared_ptr, boost::function -> std::function etc.
Besides that, I think this is a great library and I still find it a little odd why only in 2012 we're getting awesome stuff like this in Boost.
Yes, boost is still several huge steps behind other toolkits in all Unicode related. And Windows Unicode approach does not make it simpler
On 14/09/12 19:15, Artyom Beilis wrote:
Boost.Nowide is a library implemented by Artyom Beilis that make cross platform Unicode aware programming easier.
The library provides an implementation of standard C and C++ library functions, such that their inputs are UTF-8 aware on Windows without requiring to use Wide API.
Documentation: http://cppcms.com/files/nowide/html/ Downloads: http://cppcms.com/files/nowide/
Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/

On Sat, Sep 15, 2012 at 9:47 AM, Artyom Beilis <artyomtnk@yahoo.com> wrote:
From: Jookia <166291@gmail.com> After reading the documentation the only question I really have is if there's a way to have it as a drop-in replacement. Surely 'using namespace boost::nowide' would conflict with STL definitions.
[...]
I can see why this may not be desirable as it can lead to weird bugs, like the ineffectiveness of sync_with_stdio.
See, the idea is to keep the API as familiar as possible such that simple mechanical conversion can be done, similarly to boost::shared_ptr -> std::shared_ptr, boost::function -> std::function etc.
I agree with Jookia here. Although the std::remove/std::iofstream etc. are not a big deal, it will be great if there is a simple way to set the std::cout/cin/cerr to use the same stream buffers as the nowide::* counterparts. It can be something as simple as changing boost::nowide::args a(argc,argv); to boost::nowide::args_and_ios a(argc,argv); . Cheers, Yakov

On 15/09/12 18:54, Yakov Galka wrote:
On Sat, Sep 15, 2012 at 9:47 AM, Artyom Beilis <artyomtnk@yahoo.com> wrote: I agree with Jookia here. Although the std::remove/std::iofstream etc. are not a big deal, it will be great if there is a simple way to set the std::cout/cin/cerr to use the same stream buffers as the nowide::* counterparts. It can be something as simple as changing boost::nowide::args a(argc,argv); to boost::nowide::args_and_ios a(argc,argv);
I'd find that a little redundant as we'd still have to change everything to nw::getenv and whatnot. I'm fine with using a nw namespace, but it just seems like it'd make a great drop-in replacement when it comes to porting code.

----- Original Message -----
From: Jookia <166291@gmail.com> To: boost@lists.boost.org Cc: Sent: Saturday, September 15, 2012 12:06 PM Subject: Re: [boost] [nowide] Library looks for a review manager
On 15/09/12 18:54, Yakov Galka wrote:
On Sat, Sep 15, 2012 at 9:47 AM, Artyom Beilis <artyomtnk@yahoo.com> wrote: I agree with Jookia here. Although the std::remove/std::iofstream etc. are not a big deal, it will be great if there is a simple way to set the std::cout/cin/cerr to use the same stream buffers as the nowide::* counterparts. It can be something as simple as changing boost::nowide::args a(argc,argv); to boost::nowide::args_and_ios a(argc,argv);
I'd find that a little redundant as we'd still have to change everything to nw::getenv and whatnot.
I'm fine with using a nw namespace, but it just seems like it'd make a great drop-in replacement when it comes to porting code.
The only way to fully replace these is to provide an alternative standard C++ library like STLPort or libc++, but actually C library replacement may be required as std::fopen is just an alias to libc fopen. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/

On 15/09/12 19:32, Artyom Beilis wrote:
The only way to fully replace these is to provide an alternative standard C++ library like STLPort or libc++, but actually C library replacement may be required as std::fopen is just an alias to libc fopen.
Ah. I suppose drop-in replacements would end up with buggy code due to developers expecting implementation details or things to work exactly the same anyway.

----- Original Message -----
From: Yakov Galka <ybungalobill@gmail.com> To: boost@lists.boost.org Cc: Sent: Saturday, September 15, 2012 11:54 AM Subject: Re: [boost] [nowide] Library looks for a review manager
On Sat, Sep 15, 2012 at 9:47 AM, Artyom Beilis <artyomtnk@yahoo.com> wrote:
From: Jookia <166291@gmail.com> > After reading the documentation the only question I really have is if there's a way to have it as a drop-in replacement. Surely 'using namespace boost::nowide' would conflict with STL definitions.
[...]
> I can see why
this may not be desirable as it can lead to weird bugs, like the ineffectiveness of sync_with_stdio.
See, the idea is to keep the API as familiar as possible such that simple mechanical conversion can be done, similarly to boost::shared_ptr -> std::shared_ptr, boost::function -> std::function etc.
I agree with Jookia here. Although the std::remove/std::iofstream etc. are not a big deal, it will be great if there is a simple way to set the std::cout/cin/cerr to use the same stream buffers as the nowide::* counterparts. It can be something as simple as changing boost::nowide::args a(argc,argv); to boost::nowide::args_and_ios a(argc,argv); .
Actually it is **very good idea** as indeed can easily switch stream buffers cin/cout/cerr/clog there. (It is important to revert them back before exiting main and such a scoped args would do the job well. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
Cheers, Yakov
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Artyom Beilis
-
Jookia
-
Yakov Galka