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]>
Hello Jörg,

* Christian Ebert on Friday, September 15, 2006 at 11:06:06 +0200:
> * Jörg Sommer on Thursday, September 14, 2006 at 23:25:02 +0000:
>> Do I understand you right, you don't want to call iconv with all but the
>> last element of fallback_charset_list?
> 
> pseudo-code of my implementation:
> 
> foreach target (mylist)
> {
>   if (target == mylist[-1]) break; % do not run test
>   if (success == test (target)) break;
> }
> 
>> Make a foreach loop over fallback_charset_list[[:-2]].
> 
> Still I believe the code would not be less "convoluted", you
> would have to flag the success then:
> 
> variable flag = NULL;
> foreach target (myarray[[:-2]])
> {
>   if (success == test (target)) {
>     flag = 1;
>     break;
>   }
> }
> if (flag == NULL) target = myarray[-1];

Of course you're right: flagging saves doing an if-comparison in
every loop round.

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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
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.