Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-241

Non-ascii named files have names mangled



    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:


      non-ascii filenames can be specified either through configuration files or through the API.

      On Mac OS/X, file names were mangled since the file names were converted to the current locale encoding when the fopen() method requires UTF-8 strings regardless of the current locale. This can be compensated for by checking result from apr_filepath_encoding which had not been called. That suggested a pretty significant change to the File implementation. The changes for this bug will likely come in a series of patches, first getting things working on Mac OS/X then proceeding through Linux and then Windows.

      Steve Brand wrote on 2008-02-14 on log4cxx-user:


      I am using log4cxx with wchar_t* strings as the filename for my fileappender, however when passing wchar_t* or std::wstring to the LOG4CXX_DECODE_WCHAR macro it simply converts the double byte characters in the string to ?? symbols. And the file appender does not create correctly.

      Has anyone got experience with this or does log4cxx not support double byte characters for filenames at the moment?


      Steve Brand


      I am running on linux and windows but I'm primarily debugging on Windows so
      that's the platform I've seen this issue on. My encoding is English United
      kingdom (with may of the codepage conversion table options clicked.

      I send my log file content using wstring too e.g logTrace(wstring) and I've
      not been having problems.

      Its puzzling! To say the least.




            • Assignee:
              carnold@apache.org Curt Arnold
              carnold@apache.org Curt Arnold
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: