Re: email character decoding

From: Date: Sun, 22 Nov 2020 06:38:47 +0000
Subject: Re: email character decoding
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-327368@lists.php.net to get a copy of this message
i've also tried a commandline iconv -f=Windows-1250 -t=UTF-8 enca.txt but that returns the data unaltered :( On Sun, Nov 22, 2020 at 7:37 AM Rene Veerman < rene.veerman.netherlands@gmail.com> wrote: > as additional and background info, i can tell you that this data came from > a gmail server which upon 'show original', gave me extra headers (that are > not in the data, nor in the headers as downloaded through PHP's imap > functions), which told me that the charset is windows-1250. > so this must come from Google's magical algorithms, which i find up to now > impossible to reproduce :( > > On Sun, Nov 22, 2020 at 7:33 AM Rene Veerman < > rene.veerman.netherlands@gmail.com> wrote: > >> no, it PHP iconv only supports nl_NL.utf8 and various en_*.utf8 according >> to >> locale -a >> on the Ubuntu command prompt :( >> >> and using nl_NL.utf8 doesn't fix my problem either :( >> >> I've also tried saving the file to disk and then using commandline >> enca file.ext >> and >> file file.ext >> and >> chardet file.ext >> and >> uchar file.ext >> but all these will give me is that the file is encoded in ASCII. >> >> On the upside, Ubuntu commandline >> iconv >> will support the windows-1250 character set, >> but i have no way to detect which character set my document is encoded >> in, at this time :( >> >> For your convenience, i've included the file in question as an attachment >> to this email.. >> >> >> On Sat, Nov 21, 2020 at 2:59 PM Christoph M. Becker <cmbecker69@gmx.de> >> wrote: >> >>> On 21.11.2020 at 14:21, Rene Veerman wrote: >>> >>> > I'm having a bit of trouble decoding a message that was written using >>> the >>> > Windows-1250 character set, on an Ubuntu PHP installation that >>> according to >>> > mb_list_encodings only supports the Windows-1251, Windows-1252 and >>> > Windows-1254 character sets. >>> > >>> > Can someone here please point me in the direction of a solution for >>> this? >>> >>> Maybe Windows-1250 is supported by your iconv() >>> (<https://www.php.net/manual/en/function.iconv.phpüñž #¢nMyÓ >>> _>)? >>> >>> Christoph >>> >>

« previous php.general (#327368) next »