Re: display undeclared iso-charset in UTF environment

Christian Ebert <[email protected]>
Newsgroups gmane.network.slrn.user
Organization Black Trash Productions <http://www.blacktrash.org/>
Message-ID <[email protected]>
Hi Alain,

* Alain Bench on Wednesday, September 13, 2006 at 22:26:32 +0200:
>     I don't exec but just read,

I'm the other way round, that's the problem.

>     so I maybe missed something,

Of course not.

How 'bout this:

#v+
    foreach charset (fallback_charset_list)
    {
      % do not run iconv with last exit charset
      if (charset == fallback_charset_list[-1])
        break;
      probe = sprintf ("%s -s -f %s -t ucs-4 '%s' >/dev/null 2>&1; echo $?",
          iconv, charset, artpath);
      if ("0" == pipe_readline (probe, "broken iconv check"))
        break;
    }
#v-

I don't like so many if-conditions but with a success flag I
would still have to query the flag, and on failure set charset to
very last. Or would I?

c
-- 
_B A U S T E L L E N_ lesen! --->> <http://www.blacktrash.org/baustellen.html>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.