LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-15-2009, 10:44 AM   #1
Anna Petrovna
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
Looking for config.iconv


Quote:
Originally Posted by jim mcnamara View Post
There is a file, usually /usr/lib/nls/iconv/config.iconv, that lists all of the possible (allowable conversions)

On my box
Code:
iconv -f utf8 -t iso89 oldfile > newfile
does the job. You need to find config.iconv, then read it to find what your commands are.
Hello. I've been looking for config.iconv, but I didn't find it. So, I put in the terminal locate iconv and the result was the following:

/home/marta/LaTex/texmf-dist/source/fontinst/base/ficonv.dtx
/usr/bin/iconv
/usr/bin/piconv
/usr/include/iconv.h
/usr/include/gtk-2.0/gtk/gtkiconview.h
/usr/lib/kde4/share/kde4/apps/kdewidgets/pics/k3iconview.png
/usr/lib/ruby/1.8/i486-linux/iconv.so
/usr/lib/ruby/1.8/xsd/iconvcharset.rb
/usr/sbin/iconvconfig
/usr/share/apps/kdewidgets/pics/kiconview.png
/usr/share/doc/libtext-iconv-perl
/usr/share/doc/cups-pdf/examples/pstitleiconv-0.2
/usr/share/doc/cups-pdf/examples/pstitleiconv-0.2/ChangeLog
/usr/share/doc/cups-pdf/examples/pstitleiconv-0.2/README
/usr/share/doc/cups-pdf/examples/pstitleiconv-0.2/pstitleiconv
/usr/share/doc/cups-pdf/examples/pstitleiconv-0.2/pstitleiconv.conf
/usr/share/doc/libtext-iconv-perl/changelog.Debian.gz
/usr/share/doc/libtext-iconv-perl/copyright
/usr/share/man/man1/iconv.1.gz
/usr/share/man/man1/piconv.1.gz
/usr/share/man/man8/iconvconfig.8.gz
/var/lib/dpkg/info/libtext-iconv-perl.list
/var/lib/dpkg/info/libtext-iconv-perl.md5sums

In the pstitleiconv.conf archive I found that:

# configuration file for pstitleiconv cups filter
# this file is interpreted by perl

# $FROMCODE
# charset to convert from
# Default:
# ascii
#$FROMCODE = "ascii"

# $TOCODE
# charset to convert to
# Default:
# utf-8
#$TOCODE = "utf-8"

So, I suppose I just can convert archives from ascii to utf8. However, I thought the program was much more powerful. ??? Moreover, What I need is exactly the opposite operation, I mean, convert from UTF-8 to ASCII.
What can I do? I suspect I've benn commiting a mistake (or maybe several mistakes), but I don't know whichones. Any ideas?
Thank's in advanced.
 
Old 07-17-2009, 10:36 PM   #2
Dan04
Member
 
Registered: Jun 2006
Location: Texas
Distribution: Ubuntu
Posts: 207

Rep: Reputation: 37
Quote:
Originally Posted by Anna Petrovna View Post
So, I suppose I just can convert archives from ascii to utf8.
That's very easy to do, what with it being a no-op

Quote:
Originally Posted by Anna Petrovna View Post
However, I thought the program was much more powerful. ??? Moreover, What I need is exactly the opposite operation, I mean, convert from UTF-8 to ASCII.
Use

Code:
tr -d "\200-\377" <inputfile >outputfile
to remote the characters outside the ASCII range.

Unless by "ASCII" you really meant ISO-8859-1 or something similar.
 
Old 07-20-2009, 08:59 AM   #3
Anna Petrovna
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you Dan04, but I've introduced the code you wrote and the program says "invalid option --d". On the other hand, could you tell me how can I Know what conversions are allowed?
 
Old 07-20-2009, 09:12 AM   #4
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
it is a single hyphen -d or double if you provide the full switch name --delete
 
  


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
iconv always returns 0 minimol Programming 1 04-16-2009 04:51 PM
Installing iconv? Zeno McDohl Linux - Software 1 01-24-2009 05:29 AM
Iconv troubles ppr:kut Linux - Software 1 10-19-2007 05:24 AM
Sylpheed / iconv problem dorakyura Linux - Software 1 01-04-2004 02:29 PM
iconv command saravanan1979 Linux - Software 1 07-06-2002 11:55 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:30 PM.

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