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

* Jörg Sommer on Thursday, September 14, 2006 at 23:25:02 +0000:
> Christian Ebert <[email protected]> wrote:
>> But does this not call iconv for every element of
>> fallback_charset_list again?
> 
> Do I understand you right, you don't want to call iconv with all but the
> last element of fallback_charset_list?

Yes. But the crucial point is/was to set the target to the last
element in case none of the other elements passed the test.

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]].

Ah, you put the finger in the wound there: coming from python I
didn't realize that above List was actually an Array, duh.

Have to look more into this type casting.

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];


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.