[go: up one dir, main page]

Menu

Tree [267579] master / libcu8 /
 History

HTTPS access


File Date Author Commit
 include 2018-07-17 Romain GARBI Romain GARBI [c9e8ec] Added bash-like autocompletion for windows
 src 2018-08-26 Romain GARBI Romain GARBI [11fdda] Fixed a bug with history completion
 test 2018-05-18 Romain GARBI Romain GARBI [afe8ad] Change libcu8 convert functions behaviours to i...
 CHANGELOG 2017-02-13 Romain GARBI Romain GARBI [8e2673] Fixed libcu8
 COPYING 2017-02-13 Romain GARBI Romain GARBI [8e2673] Fixed libcu8
 DOC 2016-09-21 Romain GARBI Romain GARBI [78aaa0] Some fixes for utf-8 support and for.
 Makefile 2018-05-18 Romain GARBI Romain GARBI [afe8ad] Change libcu8 convert functions behaviours to i...
 README 2018-05-12 Romain GARBI Romain GARBI [f1ea54] Changed build system to makefiles based on http...
 config.c.in 2018-05-12 Romain GARBI Romain GARBI [f1ea54] Changed build system to makefiles based on http...
 config.h.in 2018-05-12 Romain GARBI Romain GARBI [f1ea54] Changed build system to makefiles based on http...

Read Me

                    ,--.    ,--. ,--.                     ,---.  
                    |  |    `--' |  |-.   ,---. ,--.,--. |  o  | 
                    |  |    ,--. | .-. ' | .--' |  ||  | .'   '. 
                    |  '--. |  | | `-' | \ `--. '  ''  ' |  o  | 
                    `-----' `--'  `---'   `---'  `----'   `---'

     The libcu8 library is designed to fix the most important flaw of msvcrt 
     lib, that is, the poor support of unicode (and particularly utf-8). It is 
     well known that the original msvcrt misbehaves when it comes to unicode 
     characters (or wide characters, as they pretty much represent the same 
     thing) and particularly utf-8. 

     For this particular reason, most ms-windows purists will tell you never 
     to use microsoft's c-runtime. Instead, they will tell you to use the 
     native windows API. Obviously, we do not think so. We do not want 
     cross-platform compatibility of C standard library to be sacrificed on the 
     altar of heavily platform-dependent APIs. Thus, we decided to write a 
     library to upgrade msvcrt and support utf-8.

What is libcu8, and how does it work ?

     Yet, Not another standalone C library

          libcu8 is a library designed as improvement of msvcrt rather than a 
          replacement of it. Indeed, libcu8 is not a standalone library, but 
          it extends functionalities of msvcrt to be able to use utf-8. Thus, 
          you won't have to re-build any of your libraries to fit with libcu8, 
          and you won't have to change your compiler's parameters either.

     Safe And flexible

          What it basically does is just overwriting a few msvcrt functions 
          within the process memory, so that msvcrt appears to be modified to 
          any other component (eg. libraries, etc.) used by the process, what 
          wouldn't be possible with two standalone libraries. It also prevents 
          permanent modifications of msvcrt, that could be source of bugs with 
          programs not designed to use libcu8.

     Easy to use

          Finally, it is incredibly easy to use : You won't have to heavily 
          modify source code of any of your programs. A few lines are 
          sufficient to upgrade a whole program, and moreover, you won't have 
          to change your coding style. It is as simple as that : add a few 
          lines, re-build your program, and you're done !

Getting started

     It is really easy to get started with libcu8... You only have to do three 
     thing : 

        - Get the lib's binary, and link it with the program you using your 
          favourite build system (Yet, that was the harder part of the job). 

        - Add a few lines to tell the library to inject its functions. By the 
          way, doing so is extremely simple, just use libcu8_init(), as shown 
          below.

             if (libcu8_init(NULL) == -1) {
             /* handle the error */
             }

        - Last but not least, don't forget to be sure to use truetype fonts  
          instead of rasters ones if you use the command prompt.

     In fact, libcu8 can do a couple more things, but these are described in 
     DOC.

Building libcu8

     Libcu8 uses GNU autotools as build, but building libcu8 is quite 
     straightforward, just do :

        ./configure
        make

     Few more targets are available, such as run-tests or install. Note that 
     libcu8 depends on libiconv, so you need to have it installed in order to 
     be able to build libcu8