LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-12-2008, 12:03 AM   #1
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 37
How to change character sets from iso-8859-1 to UTF-8?


I would appreciate the wisdom of some many slackware experts.

Now for the problem.
I originally started a similar thread on the networking forum only to discover that it is an entirely different issue.

Basically, I am trying to print through the printer on my wife's xp box on our lan.
I think I have cups and samba set up correctly. However when I tried to print, the cups log shows that I got the following error:

Quote:
E [10/Jun/2008:22:09:04 -0700] CUPS-Add-Modify-Printer: Unauthorized
I [10/Jun/2008:22:09:04 -0700] Setting momhp device-uri to "smb://mom/Printer2" (was "smb://mom/Printer2".)
I [10/Jun/2008:22:09:04 -0700] Saving printers.conf...
I [10/Jun/2008:22:09:04 -0700] Printer "momhp" modified by "root".
I [10/Jun/2008:22:09:04 -0700] Saving printers.conf...
I [10/Jun/2008:22:09:04 -0700] Printer "momhp" modified by "root".
E [10/Jun/2008:22:24:01 -0700] Unsupported character set "iso-8859-1"!
E [10/Jun/2008:22:24:01 -0700] Unsupported character set "iso-8859-1"!
E [10/Jun/2008:22:24:01 -0700] Unsupported character set "iso-8859-1"!
E [10/Jun/2008:22:24:01 -0700] Unsupported character set "iso-8859-1"!
So, having searched far and wide, there seems to be a bug reported with cups. See the following links:
http://daniel.mateos.cc/
https://bugs.launchpad.net/ubuntu/+s...ys/+bug/203944

So from what I understand, there is a work around. That is to use the utf-8 character set instead of the iso-8859-1 as suggested by this link.

How do I change from iso-8859-1 to utf-8?
Is it possible to do it only in cups and samba?
 
Old 06-12-2008, 02:37 AM   #2
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,441

Rep: Reputation: 70
This sounds like stuff that was posted in the CHANGES_AND_HINTS.TXT. Check this out first and let me know if it helps
Quote:
Originally Posted by CHANGES_AND_HINTS.TXT
There is a minor problem with the HPLIP and CUPS versions in Slackware 12.1;
hp-toolbox will not work unless LC_ALL is set to a UTF8 locale.
An easy workaround is to start it with "LC_ALL=$LANG.UTF8 hp-toolbox" if
you're not using a UTF8 locale. Also, your user account must be a member
of the "lp" group for hp-toolbox to work properly, and to use the scanner
portion of some (all?) HP print/scan/copy units, you'll need to be a member
of the "lp" group. This is due to the fact that hplip's udev rules set
the device with group "lp" ownership.
Add alias for hp-toolbox to either /etc/profile (system-wide) or ~/.profile (user specific)

Code:
alias hp-toolbox='LC_ALL=$LANG.UTF8 hp-toolbox'
Add user to lp group
Code:
gpasswd -a user lp
You could also look into hacking the rc scripts for cups and samba and add a LANG=en_US.UTF-8 in front of the call to /usr/sbin/cupsd, for example.
 
Old 06-13-2008, 11:20 PM   #3
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 37
So how would I do that for cups and samba?

Thanks

okos
 
Old 06-13-2008, 11:35 PM   #4
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,441

Rep: Reputation: 70
Quote:
Originally Posted by okos View Post
So how would I do that for cups and samba?

Thanks

okos
I have never tried this before. One way, like I said in my last post, might be to hack the init scripts. If you have cupsd called like
Code:
LANG=en_US.UTF-8 /usr/sbin/cupsd
it might do set the language. Something similar could be done for samba as well.

It would be better if you could simply set this in the cups and samba configs, however.

/etc/cups/cupsd.conf, according to man cupsd.conf has
Code:
DefaultLanguage locale
that can be set.

Similarly, I would poke around man smb.conf and see what you can come up with.
 
Old 06-15-2008, 05:48 PM   #5
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 37
I tried googiling cups and utf-8, I found that cups can handle many different character sets but have not found anything on setting utf-8 as the default character set.


Quote:
Originally Posted by shadowsnipes View Post
I have never tried this before. One way, like I said in my last post, might be to hack the init scripts. If you have cupsd called like
Code:
LANG=en_US.UTF-8 /usr/sbin/cupsd
it might do set the language. Something similar could be done for samba as well.
I will give it a try.


Quote:
It would be better if you could simply set this in the cups and samba configs, however.

/etc/cups/cupsd.conf, according to man cupsd.conf has
Code:
DefaultLanguage locale
that can be set.
I will give the a try also.

Quote:
Similarly, I would poke around man smb.conf and see what you can come up with.
man smb.conf has well over 1000 lines of info.
I am not sure if I am using the command properly but I tried:
apropos utf-8 | grep samba
and
apropos utf-8 | grep smb
with zero results.

Okos
 
Old 06-15-2008, 08:20 PM   #6
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,441

Rep: Reputation: 70
Quote:
Originally Posted by okos View Post
man smb.conf has well over 1000 lines of info.
I am not sure if I am using the command properly but I tried:
apropos utf-8 | grep samba
and
apropos utf-8 | grep smb
with zero results.

Okos
When you are in the man page try typing '/', typing in 'lang' or 'utf', and then hitting ENTER. From there 'n' goes to next instance and SHIFT+'n' goes to the previous instance.
 
Old 06-18-2008, 05:49 PM   #7
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 37
After spending two weeks of evenings trying to resolve the problem without success, I decided just to to do a temporary work around until I am able to get a new printer for myself.

I have xp on virtual box. VB enables you to share folders between the two os. I am easily able to move the doc from slack to xp to print on wife's printer through lan. That was a mouth full of words!

However, I did learn something crucial. In the past I could not get the HP toolbox to work. There was no one added to the lp group. I add myself to lp and now it works


Thanks for your help.
okos
 
Old 06-26-2008, 02:27 PM   #8
janve
LQ Newbie
 
Registered: Aug 2003
Distribution: Slackware
Posts: 11

Rep: Reputation: 0
Thanks shadowsnipes,

modifying the rc.samba and rc.cups scripts to tell the daemons
LANG=en_US.UTF-8 /usr/sbin/smbd -D and
LANG=en_US.UTF-8 /usr/sbin/cupsd, respectively, worked for me.
I do not use the HP toolbox, so I can't comment on that.

janve

Last edited by janve; 06-26-2008 at 02:34 PM.
 
Old 06-26-2008, 03:18 PM   #9
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,441

Rep: Reputation: 70
Quote:
Originally Posted by janve View Post
Thanks shadowsnipes,

modifying the rc.samba and rc.cups scripts to tell the daemons
LANG=en_US.UTF-8 /usr/sbin/smbd -D and
LANG=en_US.UTF-8 /usr/sbin/cupsd, respectively, worked for me.
I do not use the HP toolbox, so I can't comment on that.

janve
Glad to know it worked!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to switch from ISO-latin1( 8859-1) to UTF-8 and reciprocally? xpucto Linux - Newbie 3 05-17-2008 04:50 PM
convert text-file from utf-8 to iso-8859-1 [SOLVED] @ngelot Linux - Server 1 06-12-2007 05:47 AM
im getting UTF-8 to STRING: Could not open converter from 'UTF-8' to 'ISO-8859-1' jabka Linux - Newbie 2 11-24-2006 05:44 AM
Changing system character encoding to ISO 8859-1 flork Suse/Novell 1 12-15-2005 06:21 AM
Problem with UTF-8 and ISO-8859-1 dasenjo Linux - Software 0 06-22-2003 12:14 AM


All times are GMT -5. The time now is 03:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration