[omniORB] omniNames's logdir with multibyte path name (Win32)

Ando Noriaki n-ando at aist.go.jp
Sun Dec 21 18:04:34 GMT 2008


Dear omniORB developers

I'm Noriaki Ando and I'm developing robot component framework and
middleware based on omniORB.
http://www.is.aist.go.jp/rt/OpenRTM-aist/html-en/
I and our middleware users always appreciate your work.

Recently one of our user was troubled by above mentioned subject.
He executed omniNames.exe on Windows (XP home) as follows.

> omniNames.exe -start -logdir %TEMP%

In his case, the %TEMP% was
"C:\Documents and Settings\[his multibyte username]\Local Settings\Temp"
and then omniNames.exe was immediately stopped.
omniNames.exe seems not to accept multibyte logdir path.

# The most appropriate logdir would be user's %TEMP% dir on Windows.
# Usually expert user uses ASCII character username/filename
# etc. mechanically to avoid potential trouble caused by multibyte
# path name.  But Japanese beginner users sometimes uses
# multibyte (Kanji-character) username.

Our other user found that the problem does not appear if
omniORB\src\appl\omniNames\log.cc
was modified as follows.

around L405 in omniORB\src\appl\omniNames\log.cc
-------------------------------------------
  try {
  #ifdef USE_STREAM_OPEN
+ #ifdef __WIN32__
+ setlocale(LC_ALL, "");
+ #endif
  logf.OPEN(active,ios::out|ios::trunc,0666);
  if (!logf)
  throw IOError();
-------------------------------------------

Setting locale before opening log file seems not to have side
effects on both Windows and UNIX.  We would be very happy if this
modification was taken into the omniORB source code repository.


Best regards,
Noriaki Ando





-- 
Noriaki Ando, Ph.D.
          National Institute of Advanced Industrial Science and Technology
          Intelligent Systems Research Institute
          Task Intelligence Research Group
          Tsukuba Central 2, 1-1-1 Umezono, Tsukuba, Ibaraki 305-8568 JAPAN.
          TEL: +81-29-861-5981 FAX: +81-29-861-5971
          e-mail: n-ando at aist.go.jp, n-ando at ieee.org



More information about the omniORB-list mailing list