LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-08-2007, 03:19 AM   #1
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Rep: Reputation: 31
unreadable code under /var/adm/message file


1> System configuration

Sun-Blade-100 + Solaris 10 1/06 + 118833-24
LANG=ja_JP.UTF-8

2> Always got the following unreadable error under /var/adm/messages file. Any ideas about how to fix the problem.

====================================================================================
Mar 12 08:30:48 t04 gconfd (ultrasoul-851): [ID 702911 user.warning] \343\202\275\343\203\274\343\202\271 "xml:readonly:/e
tc/gconf/gconf.xml.mandatory" \343\201\256\350\252\255\343\201\277\350\276\274\343\201\277\343\201\253\345\244\261\346\225\2
27\343\201\227\343\201\276\343\201\227\343\201\237: \345\244\261\346\225\227: \343\203\242\343\202\270\343\203\245\343\203\2
74\343\203\253 'xml' \343\202\252\343\203\274\343\203\227\343\203\263\343\202\250\343\203\251\343\203\274: ld.so.1: gconfd-2
: \351\207\215\345\244\247\343\201\252\343\202\250\343\203\251\343\203\274: \345\206\215\351\205\215\347\275\256\343\202\250
\343\203\251\343\203\274: \343\203\225\343\202\241\343\202\244\343\203\253 /usr/lib/libORBit-2.so.0: \343\202\267\343\203\26
3\343\203\234\343\203\253 g_atomic_pointer_get: \345\217\202\347\205\247\343\202\267\343\203\263\343\203\234\343\203\253\343
\201\214\350\246\213\343\201\244\343\201\213\343\202\212\343\201\276\343\201\233\343\202\223\343\200 \202
====================================================================================
 
Old 05-08-2007, 07:30 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
This seems to be an UTF-8 encoded japanese message.

Not that I can understand it but here is what I got:

Code:
$ printf "\343\202\275\343\203\274\343\202\271\n"
ソース
 
Old 05-08-2007, 08:58 AM   #3
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
I wonder whether there is a method to log the Japanese message to /var/adm/messages file. Otherwise, I must use printf to see it.

Pls help, Thank you.
 
Old 05-08-2007, 11:45 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
What is your default encoding / locale ?

Code:
grep -v "^#" /etc/default/init
 
Old 05-08-2007, 08:38 PM   #5
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
#cat /etc/default/init
#
# Copyright 1992, 1999-2002 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "@(#)init.dfl 1.7 02/12/03 SMI"
#
# This file is /etc/default/init. /etc/TIMEZONE is a symlink to this file.
# This file looks like a shell script, but it is not. To maintain
# compatibility with old versions of /etc/TIMEZONE, some shell constructs
# (i.e., export commands) are allowed in this file, but are ignored.
#
# Lines of this file should be of the form VAR=value, where VAR is one of
# TZ, LANG, CMASK, or any of the LC_* environment variables. value may
# be enclosed in double quotes (") or single quotes (').
#
TZ=Japan
CMASK=022
 
Old 05-09-2007, 01:07 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Why didn't you run the command I posted that is stripping out the comments ?

Anyway, you do not set the locale and encoding in this file so I believe the system defaults to 7 bit ASCII.

Try adding this line in the init file:
Code:
LANG=ja_JP.UTF-8
The change will be picked at next reboot.
 
Old 05-09-2007, 01:43 AM   #7
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
I have tried to use printf and suceeded to see these unreadable Japanese per your first solution before I posted my previous thread. Then, I want to know whether there is a method to directly log Japanese to /var/adm/messages.

You have provided the solution to me, It works fine, Thank you very much.

Last edited by UltraSoul; 05-09-2007 at 02:03 AM.
 
Old 05-09-2007, 01:30 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Reading your last answer, I'm unsure you noticed my suggestion about setting the default LANG variable.
 
Old 05-09-2007, 08:42 PM   #9
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
I have added the entry of "LANG=ja_JP.UTF-8" to /etc/default/init and reboot system per your suggestion, It works fine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
log file not updating - /var/adm/messages vm_devadas Linux - General 5 12-21-2006 10:58 PM
Messages file in /var/adm rust8y Solaris / OpenSolaris 4 10-26-2006 01:46 AM
/var/adm rust8y Solaris / OpenSolaris 2 10-16-2006 10:12 AM
/var/adm/wtmp file is increasing its size...? johnsanty Linux - General 2 09-28-2006 11:05 PM
Moving /var/adm and /var/lib - why does it hurt? J_Szucs Linux - General 1 09-15-2004 06:46 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 02:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration