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

Non-ascii named files have names mangled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.10.0
    • None
    • None

    Description

      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:

      http://mail-archives.apache.org/mod_mbox/logging-log4cxx-user/200802.mbox/%3c20080214160146.03F874E670@mail.hitachisoft.de%3eHi,

      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?

      Thanks

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: