GitHub user hustterry opened a pull request:

    https://github.com/apache/logging-log4cxx/pull/4

    mbsrtowcs() returns the number of wide char,but not the source in str…

    mbsrtowcs() returns the number of wide char,but not the source length.
    
    If there have n chinese characters,the log will output more last n 
characters.
    
    src/main/cpp/charsetdecoder.cpp
    @@ -175,11 +175,11 @@ namespace log4cxx
                                    stat = APR_BADARG;
                                    in.position(src - in.data());
                                    break;
                                } else {
                                    stat = append(out, buf);
    -                               in.position(in.position() + converted);
    +                               in.position(in.position() + requested);
                                }
                           }
                       }
                       return stat;
                   }


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hustterry/logging-log4cxx master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/logging-log4cxx/pull/4.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4
    
----

----


---

Reply via email to