Home  /  RSS  /  RSS Comments  /  Enter

Slides From Lecture about CppCMS

Saturday, August 11, 2012, by artyom ; 0 comments

At August 3rd, I had given a lecture about CppCMS at the annual Israeli FOSS conference August Penguin.

The slides are now available for download:

http://cppcms.com/files/ap2012/

CppDB 0.3.1 Released

Saturday, June 23, 2012, by artyom ; Posted in: Storage; 0 comments

This is an important bugfix release.

It is recommended for all users to upgrade to latest version:

Critical Bugs fixed:

Full Changelog: http://cppcms.com/sql/cppdb_0.3.1/changelog.html
Downloads: https://sourceforge.net/projects/cppcms/files/cppdb/

How not to do Unicode...

Sunday, April 29, 2012, by artyom ; Posted in: Unicode and Localization; 8 comments

All started from a small problem, how to print Unicode text to the Windows Console with option redirect to a file.

Let's say we have a program Hello that prints few words in several languages to the screen..

#include <stdio.h>

int main()
{
    printf("Мир Peace Ειρήνη\n");
    return 0;   
}

The program above is trivial and works fine under Windows if current console codepage is set to UTF-8. Also this can be fixed from the program by calling SetConsolseOutputCP(CP_UTF8).

Now simple tweak... Instead of that standard C printf we would use standard C++ std::cout... It works fine for GCC. But under Visual C++ it prints squares...

If I try redirection test.exe >test.txt - I get perfectly fine UTF-8 text...

I had started researching the issue and found the post of one of the Windows Unicode Gurus Michael Kaplan's.

I've tried to run _setmode(_fileno(stdout), _O_U8TEXT) as recommended by the Microsoft's Unicode guru and... By program crashed on attempt to write to the output stream.

Keeping searching for an answer I've got to this bug report...

Short summary:

To the summary...

If you use Visual C++ you can't use UTF-8 to print text to std::cout.

If you still want to, please read this amazingly long article about how to make wcout and cout working, but it does not really give a simple solution - finally falling to redefinition of the stream buffers...

So please, if you design API or Operating System, do not use kind of "Wide" API... This is is the wrong way to do Unicode.

Which reminds me... Spread around:

http://www.utf8everywhere.org/

Related Posts: http://blog.cppcms.com/post/62

RPM Repositories for CppCMS

Thursday, March 15, 2012, by artyom ; 0 comments

Additionally to DEB Repositories, RPM repositories are ready as well.

The packages are build using Open Build Service:

http://download.opensuse.org/repositories/home:/artyom-beilis/

CppCMS 1.0.1 - Bug Fix Release

Wednesday, March 14, 2012, by artyom ; 0 comments

CppCMS 1.0.1 Released

It is a bug fix release:

Additionally to the deb releases, now source-rpm is available at sourceforge.

In order to create RPMs for your system:

Install dependent packages:

yum install cmake gcc-c++ gcc make zlib-devel pcre-devel libicu-devel libgcrypt-devel

Download source rpm and rebuild it as:

rpmbuild --rebuild cppcms-1.0.1-1.src.rpm

You will get 3 binary rpm packages: libcppcms, libcppcms-devel and cppcms-tools in the ~/rpmbuild/RPMS/ directory. Install them and use them.

Special Thanks: to Sagi Ben-Akiva for initial spec file that made this process much simpler for me.

previous page

next page

Pages

Categories